mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-26 12:56:54 +01:00
graphics: drop image heap table snapshots superseded at the same base
This commit is contained in:
@@ -5511,6 +5511,17 @@ public:
|
||||
ImageHeapTestAccess::ImageOf(heap, filtered.slots[240]),
|
||||
"a reactivated view kept an element whose image slot holds a new image");
|
||||
|
||||
// A table whose descriptor grew keeps its old snapshot until a frame passes without it.
|
||||
const IR::ImageHeapRequest grown{table, table_size * 2u, 32u, 0u, table_size / 16u, &sampled};
|
||||
for (uint32_t frame = 0; frame < 2u; ++frame) {
|
||||
Require(name, "grown table", heap.Acquire(grown, view), "a grown table was declined");
|
||||
draw();
|
||||
heap.RunGarbageCollector();
|
||||
heap.BeginDraw();
|
||||
Require(name, "superseded table", ImageHeapTestAccess::MemoryCount(heap) == 2u - frame,
|
||||
"a snapshot was dropped in a frame that acquired it or kept after one without it");
|
||||
}
|
||||
|
||||
heap.UnmapMemory(table, table_size);
|
||||
Require(name, "unmapped table",
|
||||
ImageHeapTestAccess::MemoryCount(heap) == 0u &&
|
||||
|
||||
Reference in New Issue
Block a user