Module: Mesa Branch: main Commit: f5b8b2f57ae051215f8147fe6dc74d7769bc53b3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5b8b2f57ae051215f8147fe6dc74d7769bc53b3
Author: Connor Abbott <[email protected]> Date: Tue Sep 12 20:59:11 2023 +0200 tu: Remove pipeline from state Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25276> --- src/freedreno/vulkan/tu_cmd_buffer.cc | 16 +++++++--------- src/freedreno/vulkan/tu_cmd_buffer.h | 2 -- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index 6eb4bc20b52..d2f12c007fd 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.cc +++ b/src/freedreno/vulkan/tu_cmd_buffer.cc @@ -3018,7 +3018,7 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer, assert(pipelineBindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS); - cmd->state.pipeline = tu_pipeline_to_graphics(pipeline); + struct tu_graphics_pipeline *gfx_pipeline = tu_pipeline_to_graphics(pipeline); cmd->state.dirty |= TU_CMD_DIRTY_DESC_SETS | TU_CMD_DIRTY_SHADER_CONSTS | TU_CMD_DIRTY_VS_PARAMS | TU_CMD_DIRTY_PROGRAM; @@ -3029,14 +3029,14 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer, tu_bind_fs(cmd, pipeline->shaders[MESA_SHADER_FRAGMENT]); vk_cmd_set_dynamic_graphics_state(&cmd->vk, - &cmd->state.pipeline->dynamic_state); + &gfx_pipeline->dynamic_state); cmd->state.program = pipeline->program; cmd->state.load_state = pipeline->load_state; cmd->state.prim_order_sysmem = pipeline->prim_order.state_sysmem; cmd->state.prim_order_gmem = pipeline->prim_order.state_gmem; - if (cmd->state.pipeline->feedback_loop_may_involve_textures && + if (gfx_pipeline->feedback_loop_may_involve_textures && !cmd->state.rp.disable_gmem) { /* VK_EXT_attachment_feedback_loop_layout allows feedback loop to involve * not only input attachments but also sampled images or image resources. @@ -3061,8 +3061,8 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer, if (pipeline->prim_order.sysmem_single_prim_mode && !cmd->state.rp.sysmem_single_prim_mode) { - if (cmd->state.pipeline->feedback_loop_color || - cmd->state.pipeline->feedback_loop_ds) { + if (gfx_pipeline->feedback_loop_color || + gfx_pipeline->feedback_loop_ds) { perf_debug(cmd->device, "single_prim_mode due to feedback loop"); } else { perf_debug(cmd->device, "single_prim_mode due to rast order access"); @@ -3120,10 +3120,8 @@ tu_CmdBindPipeline(VkCommandBuffer commandBuffer, cmd->state.dirty |= TU_CMD_DIRTY_PER_VIEW_VIEWPORT; } - if (cmd->state.pipeline->feedback_loop_ds != - cmd->state.pipeline_feedback_loop_ds) { - cmd->state.pipeline_feedback_loop_ds = - cmd->state.pipeline->feedback_loop_ds; + if (gfx_pipeline->feedback_loop_ds != cmd->state.pipeline_feedback_loop_ds) { + cmd->state.pipeline_feedback_loop_ds = gfx_pipeline->feedback_loop_ds; cmd->state.dirty |= TU_CMD_DIRTY_LRZ; } } diff --git a/src/freedreno/vulkan/tu_cmd_buffer.h b/src/freedreno/vulkan/tu_cmd_buffer.h index fd6265e627a..3c55af0fd9c 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.h +++ b/src/freedreno/vulkan/tu_cmd_buffer.h @@ -385,8 +385,6 @@ struct tu_cmd_state { uint32_t dirty; - struct tu_graphics_pipeline *pipeline; - struct tu_shader *shaders[MESA_SHADER_STAGES]; struct tu_program_state program;
