Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various image invalidation issues #4399

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Fix various image invalidation issues #4399

merged 4 commits into from
Oct 25, 2024

Conversation

doitsujin
Copy link
Owner

Spotted some issues while investigating #4395:

  • We shouldn't emit hundreds of VkImageMemoryBarrier2s during defrag when most of them don't even do a layout transition
    This doesn't affect correctness, but makes renderdoc captures less painful to look at and saves some CPU cycles.
  • Doing defrag where we did it was technically correct, but hard to reason about why it was correct.
  • Image invalidation for sequential swap chains image recreation was essentially broken and wouldn't ensure that the images involved were actually transitioned back to the correct layout. This is a real bug, but not related to defrag.

Instead, fold barriers with no layout transition into a simple memory
barrier to bring this in line with the usual barrier logic.
Relevant for image recreation in D3D9, not so much for defrag
since we do everything late in the command list anyway.
@doitsujin doitsujin merged commit d535e29 into master Oct 25, 2024
8 checks passed
@doitsujin doitsujin deleted the relocation-fixes branch October 25, 2024 17:23
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.

1 participant