Vulkan-docs: VK_NVX_raytracing does not document structure of the instance buffer

Created on 30 Sep 2018  路  4Comments  路  Source: KhronosGroup/Vulkan-Docs

vkCmdBuildAccelerationStructureNVX function has VkBuffer instanceData parameter but it seems there is no description of instance buffer data layout in the specification of version 1.1.86.

Most helpful comment

While we wait for the official spec clarification, it's possible to use DXR spec to guess the instance data structure. It is likely to be this:

struct Instance
{
    float transform[12];
    uint32_t instanceID : 24;
    uint32_t instanceMask : 8;
    uint32_t instanceContributionToHitGroupIndex : 24;
    uint32_t flags : 8;
    uint64_t accelerationStructureHandle;
};

Acceleration structure handle should be acquired via vkGetAccelerationStructureHandleNVX.

All 4 comments

Presumably, the missing structure is VkInstanceNVX (which is mentioned, but not detailed).

While we wait for the official spec clarification, it's possible to use DXR spec to guess the instance data structure. It is likely to be this:

struct Instance
{
    float transform[12];
    uint32_t instanceID : 24;
    uint32_t instanceMask : 8;
    uint32_t instanceContributionToHitGroupIndex : 24;
    uint32_t flags : 8;
    uint64_t accelerationStructureHandle;
};

Acceleration structure handle should be acquired via vkGetAccelerationStructureHandleNVX.

what @kayru wrote is the correct layout -- it is the same as in DXR.

We'll aim to correct this in a future documentation update.

VK_NVX_raytracing has now been replaced with VK_NV_ray_tracing which is now published in the 1.1.91 spec (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VK_NV_ray_tracing ). The documentation has also significantly improved and the issues reported here should all be addressed.

Was this page helpful?
0 / 5 - 0 ratings