Function Prototype

vkCmdSetComputeOccupancyPriorityNV

Set the compute occupancy priority for subsequent compute dispatches

To set the compute occupancy priority for subsequent compute dispatches, call:

void vkCmdSetComputeOccupancyPriorityNV(
    VkCommandBuffer commandBuffer,
    const VkComputeOccupancyPriorityParametersNV* pParameters);
  • commandBuffer is the command buffer into which the command will be recorded.
  • pParameters is 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-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 VkCommandPool that commandBuffer was allocated from must be externally synchronized