rsx: Improve swizzled layout detection

- Reset swizzle flag to false automatically on section reset.
- Detect render target payload and extract swizzle information from it.
This commit is contained in:
kd-11 2020-08-05 22:50:31 +03:00 committed by kd-11
parent 17557df9f4
commit 7109fe9889
3 changed files with 11 additions and 0 deletions

View File

@ -1089,6 +1089,7 @@ namespace rsx
gcm_format = 0;
pack_unpack_swap_bytes = false;
swizzled = false;
sync_timestamp = 0ull;
synchronized = false;

View File

@ -95,6 +95,11 @@ namespace gl
ASSERT(!managed_texture);
}
if (auto rtt = dynamic_cast<gl::render_target*>(image))
{
swizzled = (rtt->raster_type != rsx::surface_raster_type::linear);
}
flushed = false;
synchronized = false;
sync_timestamp = 0ull;

View File

@ -66,6 +66,11 @@ namespace vk
managed_texture.reset(vram_texture);
}
if (auto rtt = dynamic_cast<vk::render_target*>(image))
{
swizzled = (rtt->raster_type != rsx::surface_raster_type::linear);
}
if (synchronized)
{
// Even if we are managing the same vram section, we cannot guarantee contents are static