graphics: drop image heap table snapshots superseded at the same base

This commit is contained in:
nmzik
2026-10-25 20:56:32 +01:00
parent ba7f9969ef
commit c1dfb309a1
4 changed files with 50 additions and 14 deletions
+11
View File
@@ -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 &&