vkCmdSetRayTracingPipelineStackSizeKHR
To dynamically set the stack size for a ray tracing pipeline, call:
void vkCmdSetRayTracingPipelineStackSizeKHR(
VkCommandBuffer commandBuffer,
uint32_t pipelineStackSize);
commandBuffer
is the command buffer into which the command will be recorded.pipelineStackSize
is the stack size to use for subsequent ray tracing trace commands.
This command sets the stack size for subsequent ray tracing commands when
the ray tracing pipeline is created with
VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
set in
VkPipelineDynamicStateCreateInfo::pDynamicStates
.
Otherwise, the stack size is computed as described in
Ray Tracing Pipeline Stack.
Valid Usage
VUID-vkCmdSetRayTracingPipelineStackSizeKHR-pipelineStackSize-03610
pipelineStackSize
must be large enough for any dynamic execution
through the shaders in the ray tracing pipeline used by a subsequent
trace call
Valid Usage (Implicit)
VUID-vkCmdSetRayTracingPipelineStackSizeKHR-commandBuffer-parameter
commandBuffer
must be a valid VkCommandBuffer handle
VUID-vkCmdSetRayTracingPipelineStackSizeKHR-commandBuffer-recording
commandBuffer
must be in the recording state
VUID-vkCmdSetRayTracingPipelineStackSizeKHR-commandBuffer-cmdpool
The VkCommandPool
that commandBuffer
was allocated from must support compute operations
VUID-vkCmdSetRayTracingPipelineStackSizeKHR-renderpass
This command must only be called outside of a render pass instance
VUID-vkCmdSetRayTracingPipelineStackSizeKHR-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized ::