Skip to content

Commit

Permalink
rsx: Fix sampled descriptor address corruption
Browse files Browse the repository at this point in the history
  • Loading branch information
kd-11 committed Jul 3, 2023
1 parent f14beb4 commit 6d1e25d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rpcs3/Emu/RSX/Common/texture_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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::blit_image_static);

if (is_simple_subresource_copy &&
attr.edge_clamped &&
if (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))
{
if (result.external_subresource_desc.op != deferred_request_command::blit_image_static) [[ likely ]]
Expand Down Expand Up @@ -2327,7 +2328,11 @@ namespace rsx
result.external_subresource_desc.cache_range = lookup_range;
}

result.ref_address = attributes.address;
if (!result.ref_address)
{
result.ref_address = attributes.address;
}

result.surface_cache_tag = m_rtts.write_tag;

if (subsurface_count == 1)
Expand Down
4 changes: 4 additions & 0 deletions rpcs3/Emu/RSX/Common/texture_cache_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,13 @@ namespace rsx
{
// If we can get away with clip only, do it
if (attr.edge_clamped)
{
requires_clip = true;
}
else
{
requires_processing = true;
}
}

if (surface_is_rop_target && g_cfg.video.strict_rendering_mode)
Expand Down

0 comments on commit 6d1e25d

Please sign in to comment.