rsx: Workaround for broken rtt resampling

- Avoids WCB requirement for now to keep res scaling working correctly.
- TODO: Fix this properly
This commit is contained in:
kd-11 2020-01-25 14:39:46 +03:00 committed by kd-11
commit 79216917b3

View file

@ -1656,12 +1656,16 @@ namespace rsx
}
if (const auto section_count = result.external_subresource_desc.sections_to_copy.size();
section_count > 0 && result.atlas_covers_target_area(section_count == 1? 99 : 90))
section_count > 0)
{
// TODO: Overlapped section persistance is required for framebuffer resources to work with this!
// Yellow filter in SCV is because of a 384x384 surface being reused as 160x90 (and likely not getting written to)
// Its then sampled again here as 384x384 and this does not work! (obviously)
// TODO: Some games may render a small region (e.g 1024x256x2) and sample a huge texture (e.g 1024x1024).
// Seen in APF2k8 - this causes missing bits to be reuploaded from CPU which can cause WCB requirement.
// Properly fix this by introducing partial data upload into the surface cache in such cases and making RCB/RDB
// enabled by default. Blit engine already handles this correctly.
if (_pool == 0 || /* Hack to avoid WCB requirement for some games with wrongly declared sampler dimensions */
result.atlas_covers_target_area(section_count == 1? 99 : 90))
{
// Optionally disallow caching if resource is being written to as it is being read from
for (const auto& section : overlapping_fbos)
{
@ -1684,6 +1688,7 @@ namespace rsx
}
}
}
}
return {};
}