rsx: Fix sampled descriptor address corruption

This commit is contained in:
kd-11 2023-07-03 20:57:57 +03:00 committed by kd-11
parent 1afee59c95
commit aa06ac119f
2 changed files with 12 additions and 3 deletions

View file

@ -2004,8 +2004,9 @@ namespace rsx
(result.external_subresource_desc.op == deferred_request_command::copy_image_dynamic) || (result.external_subresource_desc.op == deferred_request_command::copy_image_dynamic) ||
(result.external_subresource_desc.op == deferred_request_command::blit_image_static); (result.external_subresource_desc.op == deferred_request_command::blit_image_static);
if (is_simple_subresource_copy && if (attr.edge_clamped &&
attr.edge_clamped && !g_cfg.video.strict_rendering_mode &&
is_simple_subresource_copy &&
render_target_format_is_compatible(result.external_subresource_desc.src0(), attr.gcm_format)) render_target_format_is_compatible(result.external_subresource_desc.src0(), attr.gcm_format))
{ {
if (result.external_subresource_desc.op != deferred_request_command::blit_image_static) [[ likely ]] if (result.external_subresource_desc.op != deferred_request_command::blit_image_static) [[ likely ]]
@ -2327,7 +2328,11 @@ namespace rsx
result.external_subresource_desc.cache_range = lookup_range; result.external_subresource_desc.cache_range = lookup_range;
} }
if (!result.ref_address)
{
result.ref_address = attributes.address; result.ref_address = attributes.address;
}
result.surface_cache_tag = m_rtts.write_tag; result.surface_cache_tag = m_rtts.write_tag;
if (subsurface_count == 1) if (subsurface_count == 1)

View file

@ -646,10 +646,14 @@ namespace rsx
{ {
// If we can get away with clip only, do it // If we can get away with clip only, do it
if (attr.edge_clamped) if (attr.edge_clamped)
{
requires_clip = true; requires_clip = true;
}
else else
{
requires_processing = true; requires_processing = true;
} }
}
if (surface_is_rop_target && g_cfg.video.strict_rendering_mode) if (surface_is_rop_target && g_cfg.video.strict_rendering_mode)
{ {