KhronosGroup / OpenXR-Tutorials

OpenXR Tutorials
https://www.openxr-tutorial.com/
Apache License 2.0
66 stars 13 forks source link

vulkan validation errors #130

Open jmoguill opened 2 months ago

jmoguill commented 2 months ago

Hi, Thank you for sharing this tutorial, it's very helpful. I added code locally to enable vulkan validation layers, including synchronization validation.

It seems that there's various validation errors when running Chapter_6_1_Multiview.
I'm running the app on PC, via Oculus Link, rendering to a Quest 2 headset.

Would be great if you can enable validation layers and address any validation issues. I'm currently using Vulkan SDK version 275.

Here's the errors I get on my machine:

VUID-VkShaderModuleCreateInfo-pCode-08740(ERROR / SPEC): msgNum: 115483881 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08740 ] | MessageID = 0x6e224e9 | vkCreateShaderModule(): SPIR-V Capability MultiView was declared, but one of the following requirements is required (VkPhysicalDeviceVulkan11Features::multiview). The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08740) Objects: 0 VUID-VkRenderPassMultiviewCreateInfo-multiview-06555(ERROR / SPEC): msgNum: 882218279 - Validation Error: [ VUID-VkRenderPassMultiviewCreateInfo-multiview-06555 ] | MessageID = 0x34959527 | vkCreateRenderPass(): multiview feature is not enabled, but VkRenderPassMultiviewCreateInfo->pViewMask[0] is 0x3. The Vulkan spec states: If the multiview feature is not enabled, each element of pViewMasks must be 0 (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfo-multiview-06555) Objects: 0 VUID-VkSubpassDescription2-multiview-06558(ERROR / SPEC): msgNum: 1150517470 - Validation Error: [ VUID-VkSubpassDescription2-multiview-06558 ] | MessageID = 0x449380de | vkCreateRenderPass(): pSubpasses[0].viewMask is 3, but multiview feature is not enabled. The Vulkan spec states: If the multiview feature is not enabled, viewMask must be 0 (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubpassDescription2-multiview-06558) Objects: 0 SYNC-HAZARD-WRITE-AFTER-WRITE(ERROR / SPEC): msgNum: 1544472022 - Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0x2a905e32360, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0x5c0ec5d6 | vkQueueSubmit(): Hazard WRITE_AFTER_WRITE for entry 0, VkCommandBuffer 0x2a910cb86b0[], Submitted access info (submitted_usage: SYNC_IMAGE_LAYOUT_TRANSITION, command: vkCmdPipelineBarrier, seq_no: 1, VkImage 0xcc0459000000001c[], reset_no: 2). Access info (prior_usage: SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_WRITE, write_barriers: 0, queue: VkQueue 0x2a905e32360[], submit: 167, batch: 0, batch_tag: 175, command: vkCmdEndRenderPass, command_buffer: VkCommandBuffer 0x2a9106061f0[], seq_no: 76, renderpass: VkRenderPass 0xc1547b000000003e[], reset_no: 2)

....

rpavlik-bot commented 1 month ago

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

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