Skip to content

Fix ray tracing validation errors #1439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

TP-David
Copy link
Contributor

This fixes the following two validation errors when ray tracing:

VUID-vkBindBufferMemory-bufferDeviceAddress-03339(ERROR / SPEC): msgNum: 1151829889 - Validation Error: [ VUID-vkBindBufferMemory-bufferDeviceAddress-03339 ] Object 0: handle = 0xdcc8fd0000000012, type = VK_OBJECT_TYPE_BUFFER; Object 1: handle = 0xd175b40000000013, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0x44a78781 | vkBindBufferMemory(): buffer was created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT bit set, memory must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set. The Vulkan spec states: If the VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress feature is enabled and buffer was created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT bit set, memory must have been allocated with the VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT bit set (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-vkBindBufferMemory-bufferDeviceAddress-03339) Objects: 2 [0] 0xdcc8fd0000000012, type: 9, name: NULL [1] 0xd175b40000000013, type: 8, name: NULL

VUID-vkCmdBuildAccelerationStructuresKHR-geometry-03673(ERROR / SPEC): msgNum: -1971459747 - Validation Error: [ VUID-vkCmdBuildAccelerationStructuresKHR-geometry-03673 ] Object 0: handle = 0x95a125000000001a, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x8a7de95d | vkCmdBuildAccelerationStructuresKHR(): pInfos[0].pGeometries[0].geometry.triangles.indexData has no buffer which 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.283.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdBuildAccelerationStructuresKHR-geometry-03673) Objects: 1 [0] 0x95a125000000001a, type: 9, name: NULL

An error still remains about an invalid image layout when running vsgraytracing, however this is a vsgExamples issue.

@theodoregoetz theodoregoetz mentioned this pull request Jun 4, 2025
11 tasks
@robertosfield robertosfield merged commit d31cbd4 into vsg-dev:master Jun 16, 2025
8 checks passed
@robertosfield
Copy link
Collaborator

Merging this PR has caused a Vulkan debug warning for non raytracing usage: #1500

I am presently looking into how we might resolve it. What I may do though is just a temporary fix that stops the Vulkan debug warning for non ray tracing code paths.

@robertosfield
Copy link
Collaborator

I have merged #1486 that adds ability to pass in the device memory flags. This resolves the Vulkan validation regression we were seeing with standard VSG usage, but unfortunately I now see now Vulkan validations errors reported for vsgraytracing. I have a lot of other tasks to get on with so will have to leave this to others to look into. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants