You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When building an acceleration structure on vulkan a vulkan validation layer error is printed
Validation Error: [ VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03806 ] Object 0: handle = 0x2bae8c8dec0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x76173dcc| vkCmdBuildAccelerationStructuresKHR(): pInfos[0].pGeometries[0].geometry.tria
ngles.indexData.deviceAddress (0x0) is not an address belonging to an existing buffer. pInfos[0].pGeometries[0].geometry.triangles.indexType is VK_INDEX_TYPE_UINT16. The Vulkan spec states: For any element of pInfos[i].pGeometries or pInfos[i].ppGeometries wit
h a geometryType of VK_GEOMETRY_TYPE_TRIANGLES_KHR, if geometry.triangles.indexType is not VK_INDEX_TYPE_NONE_KHR, geometry.triangles.indexData.deviceAddress must be a valid device address obtained from vkGetBufferDeviceAddress (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03806)
this is because when calling AccelerationStructureGeometryTrianglesDataKHR::default() in
IndexType is set to UINT16 (because apart from when building acceleration structures NONE_KHR is not valid) therefore this needs to be set by the code.
Repro steps
Call build_acceleration_structures on a vulkan device without providing a index buffer (by setting AccelerationStructureTriangles::indices to None`)
Expected vs observed behavior
There should be no validation error but one is generated
Extra materials
Screenshots to help explain your problem.
Validation logs can be attached in case there are warnings and errors.
Zip-compressed API traces and GPU captures can also land here.
Platform
N/a
Proposed Fix
impl crate::CommandEncoder for super::CommandEncoder {
for triangles in in_geometries {
let mut triangle_data =
vk::AccelerationStructureGeometryTrianglesDataKHR::default()
+ .index_type(vk::IndexType::NONE_KHR)
.vertex_data(vk::DeviceOrHostAddressConstKHR {
device_address: get_device_address(triangles.vertex_buffer),
})
The text was updated successfully, but these errors were encountered:
Description
When building an acceleration structure on vulkan a vulkan validation layer error is printed
this is because when calling
AccelerationStructureGeometryTrianglesDataKHR::default()
inwgpu/wgpu-hal/src/vulkan/command.rs
Lines 504 to 506 in 2fac5e9
IndexType is set to
UINT16
(because apart from when building acceleration structuresNONE_KHR
is not valid) therefore this needs to be set by the code.Repro steps
Call
build_acceleration_structures
on a vulkan device without providing a index buffer (by settingAccelerationStructureTriangles::indices to
None`)Expected vs observed behavior
There should be no validation error but one is generated
Extra materials
Screenshots to help explain your problem.
Validation logs can be attached in case there are warnings and errors.
Zip-compressed API traces and GPU captures can also land here.
Platform
N/a
Proposed Fix
The text was updated successfully, but these errors were encountered: