mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 11:13:19 +01:00
gl/vk: Ignore invalid texture uploads
This commit is contained in:
parent
be4bb48476
commit
818dd88390
@ -595,6 +595,13 @@ namespace gl
|
||||
const u32 texaddr = rsx::get_address(tex.offset(), tex.location());
|
||||
const u32 range = (u32)get_texture_size(tex);
|
||||
|
||||
if (!texaddr || !range)
|
||||
{
|
||||
LOG_ERROR(RSX, "Texture upload requested but texture not found, (address=0x%X, size=0x%X)", texaddr, range);
|
||||
gl_texture.bind();
|
||||
return;
|
||||
}
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + index);
|
||||
|
||||
/**
|
||||
|
@ -193,6 +193,12 @@ namespace vk
|
||||
const u32 texaddr = rsx::get_address(tex.offset(), tex.location());
|
||||
const u32 range = (u32)get_texture_size(tex);
|
||||
|
||||
if (!texaddr || !range)
|
||||
{
|
||||
LOG_ERROR(RSX, "Texture upload requested but texture not found, (address=0x%X, size=0x%X)", texaddr, range);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//First check if it exists as an rtt...
|
||||
vk::image *rtt_texture = nullptr;
|
||||
if (rtt_texture = m_rtts.get_texture_from_render_target_if_applicable(texaddr))
|
||||
|
Loading…
Reference in New Issue
Block a user