Mesa (staging/22.1): anv: fix primitive topology dynamic state emission on gfx7

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 27 23:25:26 UTC 2022


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

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Sat Jul  2 22:29:41 2022 +0300

anv: fix primitive topology dynamic state emission on gfx7

This dynamic state uses the pipeline information so it needs to be
reemitted whenever the pipeline changes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17601>
(cherry picked from commit a9abf1dd936eef6373b9e61537c89762ff5d21ee)

---

 .pick_status.json                  | 2 +-
 src/intel/vulkan/gfx7_cmd_buffer.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index d7c96235053..303077a4e65 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4423,7 +4423,7 @@
         "description": "anv: fix primitive topology dynamic state emission on gfx7",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/intel/vulkan/gfx7_cmd_buffer.c b/src/intel/vulkan/gfx7_cmd_buffer.c
index b09ffff239a..d05c9370c39 100644
--- a/src/intel/vulkan/gfx7_cmd_buffer.c
+++ b/src/intel/vulkan/gfx7_cmd_buffer.c
@@ -110,7 +110,8 @@ genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer)
    struct anv_graphics_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;
    struct anv_dynamic_state *d = &cmd_buffer->state.gfx.dynamic;
 
-   if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY) {
+   if (cmd_buffer->state.gfx.dirty & (ANV_CMD_DIRTY_PIPELINE |
+                                      ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY)) {
       uint32_t topology;
       if (anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL))
          topology = pipeline->topology;



More information about the mesa-commit mailing list