Vulkan validation error in BVHBuildTask
Loulfy opened this issue · 1 comments
Hello,
I have this validation error multiple times (one per BLAS or TLAS I think) when I execute BVHBuildTask.
I tried to set this buffer usage flag to all my buffers so I don't think it's coming from my implementation or I forgot to set up a feature?
EDIT: I created a minimal main to reproduce.
Vulkan SDK: 1.3.224.1
KickstartRT: v1.0.0 (VULKAN)
VUID-vkCmdBuildAccelerationStructuresKHR-geometry-03673(ERROR / SPEC): msgNum: -1971459747 - Validation Error: [ VUID-vkCmdBuildAccelerationStructuresKHR-geometry-03673 ] Object 0: handle = 0x205e9ab1730, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x2d0f10000000124, name = KS:SharedBufferForVertexTemp, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x8a7de95d | vkCmdBuildAccelerationStructuresKHR(): The buffer associated with pInfos[0].pGeometries[0].geometry.triangles.vertexData was not created with VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR. The Vulkan spec states: The buffers from which the buffer device addresses for all of the geometry.triangles.vertexData, geometry.triangles.indexData, geometry.triangles.transformData, geometry.aabbs.data, and geometry.instances.data members of all pInfos[i].pGeometries and pInfos[i].ppGeometries are queried must have been created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag (https://vulkan.lunarg.com/doc/view/1.3.224.1/windows/1.3-extensions/vkspec.html#VUID-vkCmdBuildAccelerationStructuresKHR-geometry-03673)
Objects: 2
[0] 0x205e9ab1730, type: 3, name: NULL
[1] 0x2d0f10000000124, type: 9, name: KS:SharedBufferForVertexTemp
Hello and thanks for your interest!
With regards to usage and flags, I'd recommend that you check out our sample code which should show proper usage. It supports the Vullkan API and while not as simple as your main.cpp should provide a reference on how to setup the buffers to be passed to Kickstart RT.