Mesa (staging/22.1): anv: remove static_state_mask

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 4 23:16:58 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: ca8af9c529b0be4b654bda4fbe7d44c3291b5e8b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca8af9c529b0be4b654bda4fbe7d44c3291b5e8b

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Thu Apr 28 10:54:27 2022 +0300

anv: remove static_state_mask

This is now unnecessary. Either an instruction is never dynamic and
it's emitted in genX_pipeline.c or it can be and it's emitted in
genX_cmd_buffer.c/gfx8_cmd_buffer/gfx7_cmd_buffer.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16220>
(cherry picked from commit 797a8850b94132361bfa586ec459705169a20c99)

---

 .pick_status.json                  |  2 +-
 src/intel/vulkan/anv_pipeline.c    | 12 ------------
 src/intel/vulkan/anv_private.h     |  5 -----
 src/intel/vulkan/genX_cmd_buffer.c |  5 -----
 4 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 046f4635d02..8a7ddb57478 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -922,7 +922,7 @@
         "description": "anv: remove static_state_mask",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 775a10ceb96..cc5b707701d 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -2375,18 +2375,6 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
    }
 
    pipeline->dynamic_state_mask = states;
-
-   /* Mark states that can either be dynamic or fully baked into the pipeline.
-    */
-   pipeline->static_state_mask = states &
-      (ANV_CMD_DIRTY_DYNAMIC_SAMPLE_LOCATIONS |
-       ANV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_STATE |
-       ANV_CMD_DIRTY_DYNAMIC_SHADING_RATE |
-       ANV_CMD_DIRTY_DYNAMIC_RASTERIZER_DISCARD_ENABLE |
-       ANV_CMD_DIRTY_DYNAMIC_LOGIC_OP |
-       ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY |
-       ANV_CMD_DIRTY_DYNAMIC_DEPTH_BOUNDS |
-       ANV_CMD_DIRTY_DYNAMIC_DEPTH_BOUNDS_TEST_ENABLE);
 }
 
 /**
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index b30a2353bee..8b9029906d9 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -3384,11 +3384,6 @@ struct anv_graphics_pipeline {
 
    uint32_t                                     batch_data[512];
 
-   /* States that are part of batch_data and should be not emitted
-    * dynamically.
-    */
-   anv_cmd_dirty_mask_t                         static_state_mask;
-
    /* States that need to be reemitted in cmd_buffer_flush_dynamic_state().
     * This might cover more than the dynamic states specified at pipeline
     * creation.
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 837207f185a..1bb7ec36bd8 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3977,11 +3977,6 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
    if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE) {
       anv_batch_emit_batch(&cmd_buffer->batch, &pipeline->base.batch);
 
-      /* Remove from dynamic state emission all of stuff that is baked into
-       * the pipeline.
-       */
-      cmd_buffer->state.gfx.dirty &= ~pipeline->static_state_mask;
-
       /* If the pipeline changed, we may need to re-allocate push constant
        * space in the URB.
        */



More information about the mesa-commit mailing list