nvpro-samples / vk_raytracing_tutorial_KHR

Ray tracing examples and tutorials using VK_KHR_ray_tracing
Apache License 2.0
1.34k stars 142 forks source link

ray_tracing_motionblur: Validation error #42

Closed kyamant closed 1 year ago

kyamant commented 1 year ago

Using Vulkan sdk 1.3.216, RTX 3070Ti (516.94) on windows 10, I am getting the following message:

ERROR: VUID-VkAccelerationStructureGeometryTrianglesDataKHR-pNext-pNext
 --> Validation Error: [ VUID-VkAccelerationStructureGeometryTrianglesDataKHR-pNext-pNext ] Object 0: handle = 0x27b882ea480, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf69d66f5 | vkGetAccelerationStructureBuildSizesKHR: value of pInfos[0].pGeometries[0].geometry.triangles.pNext must be NULL. This error is based on the Valid Usage documentation for version 216 of the Vulkan header.  It is possible that you are using a struct from a private extension or an extension that was added to a later version of the Vulkan header, in which case the use of pInfos[0].pGeometries[0].geometry.triangles.pNext is undefined and may not work correctly with validation enabled The Vulkan spec states: pNext must be NULL or a pointer to a valid instance of VkAccelerationStructureGeometryMotionTrianglesDataNV (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkAccelerationStructureGeometryTrianglesDataKHR-pNext-pNext)
ERROR: VUID-VkAccelerationStructureGeometryTrianglesDataKHR-pNext-pNext
 --> Validation Error: [ VUID-VkAccelerationStructureGeometryTrianglesDataKHR-pNext-pNext ] Object 0: handle = 0x27b882ea480, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf69d66f5 | vkCmdBuildAccelerationStructuresKHR: value of pInfos[0].pGeometries[0].geometry.triangles.pNext must be NULL. This error is based on the Valid Usage documentation for version 216 of the Vulkan header.  It is possible that you are using a struct from a private extension or an extension that was added to a later version of the Vulkan header, in which case the use of pInfos[0].pGeometries[0].geometry.triangles.pNext is undefined and may not work correctly with validation enabled The Vulkan spec states: pNext must be NULL or a pointer to a valid instance of VkAccelerationStructureGeometryMotionTrianglesDataNV (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkAccelerationStructureGeometryTrianglesDataKHR-pNext-pNext)
ERROR: VUID-VkShaderModuleCreateInfo-pCode-04146
 --> Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-04146 ] Object 0: handle = 0x27b882ea480, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xd80a42ae | vkCreateShaderModule(): A SPIR-V Extension (SPV_NV_ray_tracing_motion_blur) was declared that is not supported by Vulkan. The Vulkan spec states: pCode must not declare any SPIR-V extension that is not supported by the API, as described by the Extension section of the SPIR-V Environment appendix (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-04146)

Output seems ok: image

mklefrancois commented 1 year ago

Thanks @kyamant for reporting this. The NVIDIA motion blur extension is not integrated in the Khronos validation layer, and new validation errors are showing up. They are harmless and can be ignored by adding the following to main(), next to the other ignore debug message.

  vkctx.ignoreDebugMessage(0xf69d66f5);  // Value of pInfos[0].pGeometries[0].geometry.triangles.pNext must be NULL
  vkctx.ignoreDebugMessage(0xd80a42ae);  // SPIR-V Extension (SPV_NV_ray_tracing_motion_blur)

I'll make an update soon to correct this.

mklefrancois commented 1 year ago

Fixed in ac7c133