KhronosGroup / KhronosGroup/OpenXR-SDK-Source
vulkan synchronization validation error inside xrEndFrame implementation
- Dominant language
- Python
- Stars
- 825
- Forks
- 306
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 1
Description
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the xrEndFrame entry point and reproduce the report with the Vulkan validation layer and VK_LUNARG_api_dump enabled. Inspect the vkCmdPipelineBarrier transition from VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL to VK_IMAGE_LAYOUT_GENERAL; done means the WRITE_AFTER_WRITE hazard is understood and the synchronization behavior is corrected or clearly explained.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100