gl/vk: Ignore invalid texture uploads

This commit is contained in:
kd-11 2017-03-07 20:23:57 +03:00
parent be4bb48476
commit 818dd88390
2 changed files with 13 additions and 0 deletions

View File

@ -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);
/**

View File

@ -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))