diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index 613d199161..6ed07f9f5b 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -299,9 +299,13 @@ namespace rsx // Dirty zombies are possible with unused pixel storage subslices and are valid // Avoid double transfer if possible // This is an optional optimization that can be safely disabled - surface = dynamic_cast(surface->old_contents[0].source); - this_address = surface->memory_tag_samples[0].first; - verify(HERE), surface, this_address; + surface = static_cast(surface->old_contents[0].source); + + // Ignore self-reference + if (new_surface == surface) + { + continue; + } // If this surface has already been added via another descendant, just ignore it bool ignore = false; @@ -315,6 +319,9 @@ namespace rsx } if (ignore) continue; + + this_address = surface->memory_tag_samples[0].first; + verify(HERE), this_address; } const auto parent_region = surface->get_normalized_memory_area(); diff --git a/rpcs3/Emu/RSX/Common/surface_utils.h b/rpcs3/Emu/RSX/Common/surface_utils.h index d0c2bf0e37..b12ee0c0ec 100644 --- a/rpcs3/Emu/RSX/Common/surface_utils.h +++ b/rpcs3/Emu/RSX/Common/surface_utils.h @@ -337,7 +337,7 @@ namespace rsx void set_old_contents_region(const T& region, bool normalized) { // NOTE: This method will not perform pitch verification! - verify(HERE), region.source, region.source != this; + verify(HERE), region.source, region.source != static_cast(this); old_contents.push_back(region.template cast()); auto &slice = old_contents.back();