mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
rsx: Handle cyclic references when doing memory inheritance
This commit is contained in:
parent
34b06453f9
commit
113a49e00c
@ -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<decltype(surface)>(surface->old_contents[0].source);
|
||||
this_address = surface->memory_tag_samples[0].first;
|
||||
verify(HERE), surface, this_address;
|
||||
surface = static_cast<decltype(surface)>(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();
|
||||
|
@ -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<decltype(region.source)>(this);
|
||||
|
||||
old_contents.push_back(region.template cast<image_storage_type>());
|
||||
auto &slice = old_contents.back();
|
||||
|
Loading…
Reference in New Issue
Block a user