From 019281fb0d448d581df397271fdf93747b6bc829 Mon Sep 17 00:00:00 2001 From: Karmjit Mahil Date: Tue, 25 Jul 2023 15:55:07 +0100 Subject: [PATCH] pvr: Regenerate all descriptor program data sections The descriptor set code will undergo a rework fairly soon so instead of trying to fixup `per_stage_descriptor_masks` and deal with possible side effects of that, for now let's always regenerate all descriptor program data sections no matter the stage mask. Fixes the following: dEQP-VK.pipeline.monolithic.dynamic_offset.graphics .{multi,single_}set.{storage,uniform}_buffer.numcmdbuffers_1 .sameorder.numdescriptorsetbindings_2.numdynamicbindings_1 .numnondynamicbindings_0 Signed-off-by: Karmjit Mahil Acked-by: Alyssa Rosenzweig Part-of: --- src/imagination/vulkan/pvr_cmd_buffer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c b/src/imagination/vulkan/pvr_cmd_buffer.c index 134c66fb482..4d6f529e649 100644 --- a/src/imagination/vulkan/pvr_cmd_buffer.c +++ b/src/imagination/vulkan/pvr_cmd_buffer.c @@ -6239,8 +6239,6 @@ static VkResult pvr_validate_draw_state(struct pvr_cmd_buffer *cmd_buffer) &gfx_pipeline->shader_state.fragment.stage_state; const struct pvr_pipeline_stage_state *const vertex_state = &gfx_pipeline->shader_state.vertex.stage_state; - const struct pvr_pipeline_layout *const pipeline_layout = - gfx_pipeline->base.layout; struct pvr_sub_cmd_gfx *sub_cmd; bool fstencil_writemask_zero; bool bstencil_writemask_zero; @@ -6346,13 +6344,13 @@ static VkResult pvr_validate_draw_state(struct pvr_cmd_buffer *cmd_buffer) state->dirty.fragment_descriptors = state->dirty.vertex_descriptors; /* Account for dirty descriptor set. */ - state->dirty.vertex_descriptors |= - state->dirty.gfx_desc_dirty && - pipeline_layout - ->per_stage_descriptor_masks[PVR_STAGE_ALLOCATION_VERTEX_GEOMETRY]; - state->dirty.fragment_descriptors |= - state->dirty.gfx_desc_dirty && - pipeline_layout->per_stage_descriptor_masks[PVR_STAGE_ALLOCATION_FRAGMENT]; + /* TODO: It could be the case that there are no descriptors for a specific + * stage, or that the update descriptors aren't active for a particular + * stage. In such cases we could avoid regenerating the descriptor PDS + * program. + */ + state->dirty.vertex_descriptors |= state->dirty.gfx_desc_dirty; + state->dirty.fragment_descriptors |= state->dirty.gfx_desc_dirty; if (BITSET_TEST(dynamic_state->dirty, MESA_VK_DYNAMIC_CB_BLEND_CONSTANTS)) state->dirty.fragment_descriptors = true;