pvr: Remove scissor_accum dynamic state
authorMatt Coster <matt.coster@imgtec.com>
Fri, 30 Sep 2022 09:13:31 +0000 (10:13 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Nov 2022 16:48:51 +0000 (16:48 +0000)
This state is only required for an as-yet-unimplemented optimization.
If that optimization is ever implemented in the future, these
structures can be added back.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19342>

src/imagination/vulkan/pvr_cmd_buffer.c
src/imagination/vulkan/pvr_private.h

index 15fca2e2d2213b9678b7c6bd8900c74a00312ff3..a3ebe893f933645617ce04ba303a36708008f4ed 100644 (file)
@@ -2584,16 +2584,6 @@ void pvr_CmdBeginRenderPass2(VkCommandBuffer commandBuffer,
    pvr_perform_start_of_render_clears(cmd_buffer);
    pvr_stash_depth_format(&cmd_buffer->state,
                           &cmd_buffer->state.current_sub_cmd->gfx);
-
-   if (!pvr_loadops_contain_clear(pass->hw_setup)) {
-      state->dynamic.scissor_accum_state = PVR_SCISSOR_ACCUM_CHECK_FOR_CLEAR;
-      state->dynamic.scissor_accum_bounds.offset.x = 0;
-      state->dynamic.scissor_accum_bounds.offset.y = 0;
-      state->dynamic.scissor_accum_bounds.extent.width = 0;
-      state->dynamic.scissor_accum_bounds.extent.height = 0;
-   } else {
-      state->dynamic.scissor_accum_state = PVR_SCISSOR_ACCUM_DISABLED;
-   }
 }
 
 VkResult pvr_BeginCommandBuffer(VkCommandBuffer commandBuffer,
index d8674d005f36610f5b5aec524a6315554d9ab2d0..9c88e6fa3dac360fdd6b7fe8381b9fa9680b0ea2 100644 (file)
@@ -165,21 +165,6 @@ enum pvr_stage_allocation {
    PVR_STAGE_ALLOCATION_COUNT
 };
 
-/* Scissor accumulation state defines
- *  - Disabled means that a clear has been detected, and scissor accumulation
- *    should stop.
- *  - Check for clear is when there's no clear loadops, but there could be
- *    another clear call that would be broken via scissoring
- *  - Enabled means that a scissor has been set in the pipeline, and
- *    accumulation can continue
- */
-enum pvr_scissor_accum_state {
-   PVR_SCISSOR_ACCUM_INVALID = 0, /* Explicitly treat 0 as invalid */
-   PVR_SCISSOR_ACCUM_DISABLED,
-   PVR_SCISSOR_ACCUM_CHECK_FOR_CLEAR,
-   PVR_SCISSOR_ACCUM_ENABLED,
-};
-
 #define PVR_STATIC_CLEAR_PDS_STATE_COUNT          \
    (pvr_cmd_length(TA_STATE_PDS_SHADERBASE) +     \
     pvr_cmd_length(TA_STATE_PDS_TEXUNICODEBASE) + \
@@ -976,14 +961,6 @@ struct pvr_cmd_buffer_state {
    struct PVRX(TA_STATE_HEADER) emit_header;
 
    struct {
-      /* FIXME: Check if we need a dirty state flag for the given scissor
-       * accumulation state.
-       * Check whether these members should be moved in the top level struct
-       * and this struct replaces with just pvr_dynamic_state "dynamic".
-       */
-      enum pvr_scissor_accum_state scissor_accum_state;
-      VkRect2D scissor_accum_bounds;
-
       struct pvr_dynamic_state common;
    } dynamic;