Previously the code was saving the mask as a VkShaderStageFlags
but when allocating shareds it checked against pvr_stage_allocation.
This causes problems as only the vertex bit matches the
VkShaderStageFlagBits so the push constants utilized in fragment
shaders weren't picked up properly.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22731>
/* Contains set_count amount of descriptor set layouts. */
struct pvr_descriptor_set_layout *set_layout[PVR_MAX_DESCRIPTOR_SETS];
- VkShaderStageFlags push_constants_shader_stages;
+ /* Mask of enum pvr_stage_allocation. */
+ uint8_t push_constants_shader_stages;
uint32_t vert_push_constants_offset;
uint32_t frag_push_constants_offset;
uint32_t compute_push_constants_offset;
for (uint32_t i = 0; i < pCreateInfo->pushConstantRangeCount; i++) {
const VkPushConstantRange *range = &pCreateInfo->pPushConstantRanges[i];
- layout->push_constants_shader_stages |= range->stageFlags;
+ layout->push_constants_shader_stages |=
+ vk_to_pvr_shader_stage_flags(range->stageFlags);
/* From the Vulkan spec. 1.3.237
* VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-00292 :