f4a4e2af
by Evan Tang at 2025-06-25T16:06:49+02:00
vkd3d: Replace the resource count field of struct d3d12_heap with an internal refcount.
When a heap was released at the same time as the last resource on that
heap, it was possible for both to see each other's
refcount/resource_count as 0 and both would try to destroy the heap.
Avoid that by converting "resource_count" to an internal refcount, which
holds an extra +1 if the main refcount is nonzero. The final release
will then be synchronized between the two since both will operate on
"internal_refcount".