Fix synchronization validation errors, edit comments, add SDL_SyncWindow#6
Open
th3or14 wants to merge 4 commits into
Open
Fix synchronization validation errors, edit comments, add SDL_SyncWindow#6th3or14 wants to merge 4 commits into
th3or14 wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.Suggestion cannot be applied right now. Please check back later.
I set the environment variable
VK_VALIDATION_VALIDATE_SYNC=1and got synchronization validation error messages.After realizing that they come from
vkx_transition_image_layoutcalls, I located which calls trigger errors. I did it by temporarily changing access and stage masks the following wayinside
vkx_transition_image_layoutfor every pair ofold_layoutandnew_layoutuntil all the synchronization validation error messages were gone. This way I located 2 cases giving synchronization validation error messages:and
Then I looked around for what values of access and stage masks should be used in those cases. When fixing the first case, I used the symmetric (where old layout and new layout are swapped) case
as a reference. When fixing the second case, I used the symmetric case
as a reference. Then synchronization validation error messages do not appear on my side anymore with the environment variable
VK_VALIDATION_VALIDATE_SYNC=1set.Corrected a few comments to
vkx_transition_image_layout.Removed confusing comments
// Create the base descriptor sets. They are identical and probably wrong. Right few lines above them there are already comments// ----- Create the descriptor sets -----and// ----- Create the screen descriptor sets -----.Added
SDL_SyncWindowafterSDL_SetWindowFullscreen.When you toggle the fullscreen mode, you may notice that after the message
there are messages
because the window may be not yet resized by the time the swapchain is recreated after toggling the fullscreen mode. So then the swapchain is recreated again by the time the window is really resized. It happens because
SDL_SetWindowFullscreenis asynchronous. After addingSDL_SyncWindow, the swapchain becomes recreated just once after toggling the fullscreen mode.