vkCmdSetViewportShadingRatePaletteNV(3)

# vkCmdSetViewportShadingRatePaletteNV(3) Manual Page

## Name

vkCmdSetViewportShadingRatePaletteNV - Set shading rate image palettes on a command buffer

## C Specification

If a pipeline state object is created with `VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV` enabled, the per-viewport shading rate image palettes are set by the command:

    void vkCmdSetViewportShadingRatePaletteNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstViewport,
        uint32_t                                    viewportCount,
        const VkShadingRatePaletteNV*               pShadingRatePalettes);

## Parameters

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstViewport` is the index of the first viewport whose shading rate palette is updated by the command.

- `viewportCount` is the number of viewports whose shading rate palettes are updated by the command.

- `pShadingRatePalettes` is a pointer to an array of VkShadingRatePaletteNV structures defining the palette for each viewport.

## Description

Valid Usage

- The shading rate image feature must be enabled.

- `firstViewport` must be less than `VkPhysicalDeviceLimits`::`maxViewports`

- The sum of `firstViewport` and `viewportCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- If the multiple viewports feature is not enabled, `firstViewport` must be `0`

- If the multiple viewports feature is not enabled, `viewportCount` must be `1`

Valid Usage (Implicit)

- `commandBuffer` must be a valid VkCommandBuffer handle

- `pShadingRatePalettes` must be a valid pointer to an array of `viewportCount` valid VkShadingRatePaletteNV structures

- `commandBuffer` must be in the recording state

- The `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- `viewportCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type
--- | --- | --- | ---
Primary Secondary | Both | Graphics |

## See Also

VkCommandBuffer, VkShadingRatePaletteNV

## 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.