rsx: Release misconfigured texture memory before attempting reupload

This commit is contained in:
kd-11 2020-09-18 15:23:51 +03:00 committed by kd-11
parent 36ac68b436
commit d3898fda57

View File

@ -1601,8 +1601,11 @@ namespace rsx
{
// We can have the correct data in cached_texture but it needs decoding before it can be sampled.
// Usually a sign of a game bug where the developer forgot to mark the texture correctly the first time we see it.
// TODO: This section should execute under an exclusive lock, but we're not actually modifying any object references, only flags
rsx_log.error("A texture was found in cache for address 0x%x, but swizzle flag does not match", attr.address);
continue;
cached_texture->unprotect();
cached_texture->set_dirty(true);
return {};
}
return{ cached_texture->get_view(encoded_remap, remap), cached_texture->get_context(), cached_texture->get_format_class(), scale, cached_texture->get_image_type() };
@ -2336,7 +2339,6 @@ namespace rsx
if (use_null_region)
{
// Attach to existing region
cached_dest = surface;