mirror of https://github.com/RPCS3/rpcs3.git
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 texaddr = rsx::get_address(tex.offset(), tex.location());
|
||||||
const u32 range = (u32)get_texture_size(tex);
|
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);
|
glActiveTexture(GL_TEXTURE0 + index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -193,6 +193,12 @@ namespace vk
|
||||||
const u32 texaddr = rsx::get_address(tex.offset(), tex.location());
|
const u32 texaddr = rsx::get_address(tex.offset(), tex.location());
|
||||||
const u32 range = (u32)get_texture_size(tex);
|
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...
|
//First check if it exists as an rtt...
|
||||||
vk::image *rtt_texture = nullptr;
|
vk::image *rtt_texture = nullptr;
|
||||||
if (rtt_texture = m_rtts.get_texture_from_render_target_if_applicable(texaddr))
|
if (rtt_texture = m_rtts.get_texture_from_render_target_if_applicable(texaddr))
|
||||||
|
|
Loading…
Reference in New Issue