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

Author: Iván Briano <[email protected]>
Date:   Tue Aug  9 11:41:31 2022 -0700

anv: emit scissors when the pipeline changes

With the switch to common dynamic state tracking, something got lost
that made the scissors not always be emitted when they are not dynamic
and the pipeline is marked dirty.

Since both viewport and scissors make use of each other to calculate
their values, just stick the scissor emit in the same if block as
viewport for now.
I'd rather have them decoupled, and at least the Vulkan CTS didn't
complain when I tried it, but I don't know what other effects that
may have, especially when it comes to the guardband.

Fixes a bunch of tests under
dEQP-VK.pipeline.*.multisample.misc.*

Fixes: 7d25c04236b ("anv: Switch to using common dynamic state tracking")

Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17964>
(cherry picked from commit fbd41337354326354739042368989535d79f1640)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 973445ef30c..276a22a6e3f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -157,7 +157,7 @@
         "description": "anv: emit scissors when the pipeline changes",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "7d25c04236be85eac56ff88470be7199664b3aa8"
     },
diff --git a/src/intel/vulkan/genX_cmd_buffer.c 
b/src/intel/vulkan/genX_cmd_buffer.c
index c0b1ff76591..64c6f183ae2 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3992,12 +3992,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer 
*cmd_buffer)
       cmd_buffer_emit_viewport(cmd_buffer);
       cmd_buffer_emit_depth_viewport(cmd_buffer,
                                      pipeline->depth_clamp_enable);
-   }
-
-   if ((cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_RENDER_TARGETS) ||
-       BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_VP_VIEWPORTS) ||
-       BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_VP_SCISSORS))
       cmd_buffer_emit_scissor(cmd_buffer);
+   }
 
    if ((cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE) ||
        BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_IA_PRIMITIVE_TOPOLOGY)) {

Reply via email to