mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
gl/vk: Ignore invalid texture uploads
This commit is contained in:
parent
be4bb48476
commit
818dd88390
2 changed files with 13 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue