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

vulkan synchronization validation error inside xrEndFrame implementation #478

Open
jmoguill opened this issue May 14, 2024 · 2 comments
Open
Labels
runtime related a problem/question for a runtime, not OpenXR itself synced to gitlab Synchronized to OpenXR internal GitLab waiting for reporter

Comments

@jmoguill
Copy link

jmoguill commented May 14, 2024

I'm getting a vulkan validation error. It seems the error occurs inside the OpenXR source code, when xrEndFrame is called.
I enabled VK_LUNARG_api_dump to dump the vulkan calls.....
it seems that xrEndFrame internally issues a call to vkCmdPipelineBarrier, but the srcAccessMask and dstAccessMask are set to VK_ACCESS_NONE....

        srcAccessMask:                  VkAccessFlags = 0 (VK_ACCESS_NONE)
        dstAccessMask:                  VkAccessFlags = 0 (VK_ACCESS_NONE)
        oldLayout:                      VkImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL (2)
        newLayout:                      VkImageLayout = VK_IMAGE_LAYOUT_GENERAL (1)
        srcQueueFamilyIndex:            uint32_t = 0
        dstQueueFamilyIndex:            uint32_t = 4294967294

....

I get a synchronization error: WRITE AFTER WRITE hazard....

Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0x2b7e8080eb0, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0x5c0ec5d6 | vkQueueSubmit(): Hazard WRITE_AFTER_WRITE for entry 0, VkCommandBuffer 0x2b7f744f840[], Submitted access info (submitted_usage: SYNC_IMAGE_LAYOUT_TRANSITION, command: vkCmdPipelineBarrier, seq_no: 1, VkImage 0x30f5a50000000020[VrVkSwapchain_color_0], reset_no: 2). Access info (prior_usage: SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_WRITE, write_barriers: 0, queue: VkQueue 0x2b7e8080eb0[], submit: 69, batch: 0, batch_tag: 79, command: vkCmdEndRenderPass, command_buffer: VkCommandBuffer 0x2b7f7d725f0[commandList[0]], seq_no: 5, renderpass: VkRenderPass 0x45a74f000000004a[], reset_no: 1).

This is with OpenXR version 1.0.34, and vulkan validation layer 275....

Please advise? are the srcAccessMask and dstAccessMask incorrect?

@rpavlik
Copy link
Contributor

rpavlik commented May 16, 2024

OpenXR itself only publishes the loader and a few other pieces of software, not an implementation of xrEndFrame. What runtime are you using? That is who has the validation error.

@rpavlik rpavlik added waiting for reporter runtime related a problem/question for a runtime, not OpenXR itself labels May 16, 2024
@rpavlik-bot
Copy link
Collaborator

An issue (number 2305) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2305 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

@rpavlik-bot rpavlik-bot added the synced to gitlab Synchronized to OpenXR internal GitLab label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime related a problem/question for a runtime, not OpenXR itself synced to gitlab Synchronized to OpenXR internal GitLab waiting for reporter
Projects
None yet
Development

No branches or pull requests

3 participants