vkCmdSetComputeOccupancyPriorityNV
To set the compute occupancy priority for subsequent compute dispatches, call:
void vkCmdSetComputeOccupancyPriorityNV(
VkCommandBuffer commandBuffer,
const VkComputeOccupancyPriorityParametersNV* pParameters);
pub fn cmd_set_compute_occupancy_priority_nv(
command_buffer: vk::CommandBuffer,
p_parameters: *const vk::ComputeOccupancyPriorityParametersNV,
);
commandBufferis the command buffer into which the command will be recorded.pParametersis a pointer to a VkComputeOccupancyPriorityParametersNV structure specifying the occupancy priority parameters.
The occupancy priority affects how compute workloads utilize GPU compute resources relative to other simultaneously executing workloads. The priority is stateful on a command buffer. All compute dispatch commands issued subsequent to a vkCmdSetComputeOccupancyPriorityNV call will be executed with the specified priority parameters until another vkCmdSetComputeOccupancyPriorityNV call is made.
All command buffers (primary and secondary) start with a priority level
equal to the VK_COMPUTE_OCCUPANCY_PRIORITY_NORMAL_NV value.
The priority state is not inherited by secondary command buffers - each
command buffer maintains its own independent priority state.
Valid Usage (Implicit)
VUID-vkCmdSetComputeOccupancyPriorityNV-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdSetComputeOccupancyPriorityNV-pParameters-parameter
pParameters must be a valid pointer to a valid VkComputeOccupancyPriorityParametersNV structure
VUID-vkCmdSetComputeOccupancyPriorityNV-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdSetComputeOccupancyPriorityNV-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT operations
VUID-vkCmdSetComputeOccupancyPriorityNV-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized