lavapipe: save pipeline stages that push constants are active on

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
This commit is contained in:
Mike Blumenkrantz 2022-03-18 09:48:16 -04:00 committed by Marge Bot
parent 526e898dfc
commit c264b1b6ab
2 changed files with 2 additions and 0 deletions

View file

@ -301,6 +301,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreatePipelineLayout(
const VkPushConstantRange *range = pCreateInfo->pPushConstantRanges + i;
layout->push_constant_size = MAX2(layout->push_constant_size,
range->offset + range->size);
layout->push_constant_stages |= (range->stageFlags & BITFIELD_MASK(MESA_SHADER_STAGES));
}
layout->push_constant_size = align(layout->push_constant_size, 16);
*pPipelineLayout = lvp_pipeline_layout_to_handle(layout);

View file

@ -459,6 +459,7 @@ struct lvp_pipeline_layout {
uint32_t num_sets;
uint32_t push_constant_size;
VkShaderStageFlags push_constant_stages;
struct {
bool has_dynamic_offsets;
} stage[MESA_SHADER_STAGES];