[WIP] D3D12: Handle descriptor pool re-use, PSO disk cache issues #4094
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
D3D12 does not handle running out of descriptors when the temporary pool is exhausted, which resulted in graphical corruption or driver resets when this occurred within a single frame.
This also sorts out the huge memory usage on recent AMD drivers (2-3GB memory usage after starting a game).
On AMD, the PSO cache seems to have issues when recreating the pipeline objects after reloading, in the earlier driver releases it caused bugchecks, and in the latest release seems to crash within the driver. I've double-checked that the state matches exactly when re-creating the PSO, which it does, but it is possible I've missed something, so I'm marking this WIP until I get a chance to investigate further.
Relevant issues:
https://bugs.dolphin-emu.org/issues/9701
https://bugs.dolphin-emu.org/issues/9652
https://bugs.dolphin-emu.org/issues/9640 (possibly)
https://bugs.dolphin-emu.org/issues/9461 (possibly)
This change is