Skip to content

D3dx12residency fixes for errors with debug layer enabled.#930

Merged
sivileri merged 1 commit intomicrosoft:masterfrom
dmeen-rare:master
Oct 29, 2025
Merged

D3dx12residency fixes for errors with debug layer enabled.#930
sivileri merged 1 commit intomicrosoft:masterfrom
dmeen-rare:master

Conversation

@dmeen-rare
Copy link
Copy Markdown
Contributor

3 fixes here:
There's multiple copies of d3dx12residency.h, one of which contains fixes that are missing from the others. This change makes all the files the same.
If the debug layer is enabled then it would report an error until the first resource is evicted because it tries to wait on fence value 0. If there's nothing to wait for it now returns immediately.
In extremely rare situations it's possible for the same resource to be evicted multiple times, giving it a negative residency count. This can only happen if not enough resources can be evicted for the current sync point while there are multiple syncs queued, causing it to try again. This change should make it only evict each resource once.

@GameDreamByHuo
Copy link
Copy Markdown

GameDreamByHuo commented Oct 28, 2025 via email

@dmeen-rare
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Rare Ltd"

@sivileri
Copy link
Copy Markdown
Contributor

@dmeen-rare thanks for submitting these fixes. They look good to me, it correctly resets the evict count after the call to evict, it ports #785 into the other forks of the residency library file,
and also removes the D3D12 WARNING: ID3D12CommandQueue1::Wait: Fence values can never be less than zero, so waiting for a fence value of zero will always be satisfied [ EXECUTION WARNING #1424: FENCE_ZERO_WAIT] messages.

@sivileri sivileri merged commit fc2e476 into microsoft:master Oct 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants