Skip to content

anv: simplify push constant emissions

Instead of allocating a push constant buffer per stage from the dynamic state pool, we can use the same one for all stages.

We can do this because the push constant data is supposed to be identical of all stages. Even if vkCmdPushConstants() allows to update chunks of the push constant data differently per stage, this valid usage guarantees that any chunk of push constant data used be 2 different stages must be identical :

"For each byte in the range specified by offset and size and for each push constant range that overlaps that byte, stageFlags must include all stages in that push constant range’s VkPushConstantRange::stageFlags"

Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com

/cc @jekstrand

Merge request reports