C Specification
To dispatch ray tracing, with some parameters sourced on the device, use:
void vkCmdTraceRaysIndirectKHR(
VkCommandBuffer commandBuffer,
const VkStridedBufferRegionKHR* pRaygenShaderBindingTable,
const VkStridedBufferRegionKHR* pMissShaderBindingTable,
const VkStridedBufferRegionKHR* pHitShaderBindingTable,
const VkStridedBufferRegionKHR* pCallableShaderBindingTable,
VkBuffer buffer,
VkDeviceSize offset);
Parameters
-
commandBufferis the command buffer into which the command will be recorded. -
pRaygenShaderBindingTableis the strided buffer range that holds the shader binding table data for the ray generation shader stage. -
pMissShaderBindingTableis the strided buffer range that holds the shader binding table data for the miss shader stage. -
pHitShaderBindingTableis the strided buffer range that holds the shader binding table data for the hit shader stage. -
pCallableShaderBindingTableis the strided buffer range that holds the shader binding table data for the callable shader stage. -
bufferis the buffer containing the trace ray parameters. -
offsetis the byte offset intobufferwhere parameters begin.
Description
vkCmdTraceRaysIndirectKHR behaves similarly to vkCmdTraceRaysKHR
except that the ray trace query dimensions are read by the device from a
buffer during execution.
The parameters of trace ray are encoded in the
VkTraceRaysIndirectCommandKHR structure.
See Also
VkBuffer, VkCommandBuffer, VkDeviceSize, VkStridedBufferRegionKHR
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
Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.