Mesa (staging/20.0): anv: Move vb_emit setup closer to where it's used in flush_state

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 23 05:32:24 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 928580a13d373d6887c2e1020c4d3ac0c55fe43d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=928580a13d373d6887c2e1020c4d3ac0c55fe43d

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Apr 16 15:31:15 2020 -0500

anv: Move vb_emit setup closer to where it's used in flush_state

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4601>
(cherry picked from commit ffc84eac0d5a0c30e445fcdb2f0cfd0c5bf5321d)

---

 .pick_status.json                  | 2 +-
 src/intel/vulkan/genX_cmd_buffer.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index a7f260e5e48..933ab9d4cd5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1435,7 +1435,7 @@
         "description": "anv: Move vb_emit setup closer to where it's used in flush_state",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index f320b7a49b5..97cc4ab0a6f 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3136,10 +3136,6 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
    struct anv_pipeline *pipeline = cmd_buffer->state.gfx.base.pipeline;
    uint32_t *p;
 
-   uint32_t vb_emit = cmd_buffer->state.gfx.vb_dirty & pipeline->vb_used;
-   if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE)
-      vb_emit |= pipeline->vb_used;
-
    assert((pipeline->active_stages & VK_SHADER_STAGE_COMPUTE_BIT) == 0);
 
    genX(cmd_buffer_config_l3)(cmd_buffer, pipeline->urb.l3_config);
@@ -3148,6 +3144,10 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
 
    genX(flush_pipeline_select_3d)(cmd_buffer);
 
+   uint32_t vb_emit = cmd_buffer->state.gfx.vb_dirty & pipeline->vb_used;
+   if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE)
+      vb_emit |= pipeline->vb_used;
+
    if (vb_emit) {
       const uint32_t num_buffers = __builtin_popcount(vb_emit);
       const uint32_t num_dwords = 1 + num_buffers * 4;



More information about the mesa-commit mailing list