C Specification

To query the opaque handles of shaders in the ray tracing pipeline, call:

VkResult vkGetRayTracingShaderGroupHandlesNV(
    VkDevice                                    device,
    VkPipeline                                  pipeline,
    uint32_t                                    firstGroup,
    uint32_t                                    groupCount,
    size_t                                      dataSize,
    void*                                       pData);

Parameters

  • device is the logical device containing the ray tracing pipeline.

  • pipeline is the ray tracing pipeline object containing the shaders.

  • firstGroup is the index of the first group to retrieve a handle for from the VkRayTracingShaderGroupCreateInfoNV::pGroups array.

  • groupCount is the number of shader handles to retrieve.

  • dataSize is the size in bytes of the buffer pointed to by pData.

  • pData is a pointer to a user-allocated buffer where the results will be written.

Description

Valid Usage
  • The sum of firstGroup and groupCount must be less than the number of shader groups in pipeline.

  • dataSize must be at least VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize × groupCount

Valid Usage (Implicit)
  • device must be a valid VkDevice handle

  • pipeline must be a valid VkPipeline handle

  • pData must be a valid pointer to an array of dataSize bytes

  • dataSize must be greater than 0

  • pipeline must have been created, allocated, or retrieved from device

Return Codes
On success, this command returns
  • VK_SUCCESS

On failure, this command returns
  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.