Push constants are specially designed to update the shader constant data using the command buffer instead of updating the resources with the write or copy descriptors.
Push constants offer a high-speed optimized path to update the constant data in the pipeline.
In this section, we will quickly implement an example to demonstrate a push constant. We will learn how push constants are used with command buffers to update the resource contents in the shader. This example defines two types of resources in the fragment shader—
mixerValue—within the push constant uniform block
constColor resource contains an integer value that is used as a flag to render the rotating cube in a solid color ...