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
Hi, I am doing layering API over Raytracing extension.
I have found that VkAccelerationStructureBuildRangeInfoKHR is separate from VkAccelerationStructureGeometry*DataKHR, which creates unnecessary housekeeping, since you either have to keep separate arrays of data in sync or even worse for VkAccelerationStructureBuildRangeInfoKHR it is keeping extra array of pointers.
For AABBs this could have easily been an extra uint32_t for number of AABBs in the scene. For Vertex Data it is just an extra index size.
Not all members of VkAccelerationStructureBuildRangeInfoKHR are used anyways. Most of the functionality is redundant, since you could offset into the buffer address directly by adding a constant to it, since the buffer address is virtual.
Is there an explanation why those structures are separate?
EDIT: Originally the question was about direct RTAS build. Although after investigation on indirect build, for which VkAccelerationStructureBuildRangeInfoKHR is used as an indirect argument, it is still unclear why couldn't the addresses be pushed as indirect arguments, instead of offsets.
The text was updated successfully, but these errors were encountered:
Agrael1
changed the title
Why is there VkAccelerationStructureBuildRangeInfoKHR at all?
What is the purpose of VkAccelerationStructureBuildRangeInfoKHR?
Jan 2, 2025
This was previously answered directly in a TSG meeting, but recording an answer here for posterity.
The exact details are getting forgotten in the annals history as that was a number of years ago at this point, but a couple of reasons that we could come up with in retrospect are:
we wanted to keep this parallel between direct and indirect builds
the VkAccelerationStructureGeometry*DataKHR need to be provided both to the build AS commands and to the vkGetAccelerationStructureBuildSizesKHR command, but the range infos aren't needed for vkGetAccelerationStructureBuildSizesKHR so we didn't want to require that info to be provided there, but otherwise didn't want to duplicate the geometry data structures.
something something.. complicated evolution of the specs :-)
Hi, I am doing layering API over Raytracing extension.
I have found that
VkAccelerationStructureBuildRangeInfoKHR
is separate fromVkAccelerationStructureGeometry*DataKHR
, which creates unnecessary housekeeping, since you either have to keep separate arrays of data in sync or even worse forVkAccelerationStructureBuildRangeInfoKHR
it is keeping extra array of pointers.For AABBs this could have easily been an extra uint32_t for number of AABBs in the scene. For Vertex Data it is just an extra index size.
Not all members of
VkAccelerationStructureBuildRangeInfoKHR
are used anyways. Most of the functionality is redundant, since you could offset into the buffer address directly by adding a constant to it, since the buffer address is virtual.Is there an explanation why those structures are separate?
EDIT: Originally the question was about direct RTAS build. Although after investigation on indirect build, for which
VkAccelerationStructureBuildRangeInfoKHR
is used as an indirect argument, it is still unclear why couldn't the addresses be pushed as indirect arguments, instead of offsets.The text was updated successfully, but these errors were encountered: