Skip to content
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

Spec clarification regarding VkAccelerationStructureBuildRangeInfoKHR::primitiveOffset #2445

Open
cmannett85-arm opened this issue Oct 11, 2024 · 1 comment

Comments

@cmannett85-arm
Copy link

In the spec it states:

VUID-VkAccelerationStructureBuildRangeInfoKHR-primitiveOffset-03657
For geometries of type VK_GEOMETRY_TYPE_TRIANGLES_KHR, if the geometry does not use indices, the offset primitiveOffset from VkAccelerationStructureGeometryTrianglesDataKHR::vertexData must be a multiple of the component size of VkAccelerationStructureGeometryTrianglesDataKHR::vertexFormat

The 'component size' seems like an odd choice since there are formats with different sizes of components, but it seems wrong when you consider that VkAccelerationStructureGeometryTrianglesDataKHR::vertexData uses a stride when being read from. So shouldn't constraint VUID-VkAccelerationStructureBuildRangeInfoKHR-primitiveOffset-03657 specify that the primitiveOffset be in multiples of VkAccelerationStructureGeometryTrianglesDataKHR::vertexStride?

@dgkoch
Copy link
Contributor

dgkoch commented Oct 18, 2024

Hi @cmannett85-arm,

We discussed on the Ray Tracing TSG on 10/17.

We agree the component size alignment requirement is a bit odd, at least for packed- or sub-32-bit components, however it does largely make sense for 32-bit or larger components.
However we also don't think that multiple of vertexStride is the correct thing either.
We've created an internal issue to further discuss and attempt to clarify: https://gitlab.khronos.org/vulkan/vulkan/-/issues/4058

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

No branches or pull requests

3 participants