Mesa (staging/22.1): radv: re-emit dynamic line stipple state if the primitive topology changed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 4 22:17:21 UTC 2022


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue May  3 12:14:38 2022 +0200

radv: re-emit dynamic line stipple state if the primitive topology changed

The dynamic primitive topology could change from LINE_LIST to
LINE_STRIP for example and the stipple state depends on this.

Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16295>
(cherry picked from commit f5cffbb8df7721efc1698ea2289f40b8e6372f9e)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 5bf7bbeae22..2fbac5ff5fd 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -76,7 +76,7 @@
         "description": "radv: re-emit dynamic line stipple state if the primitive topology changed",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 1727340675a..dd2a8cca532 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -3081,7 +3081,8 @@ radv_cmd_buffer_flush_dynamic_state(struct radv_cmd_buffer *cmd_buffer, bool pip
    if (states & RADV_CMD_DIRTY_DYNAMIC_SAMPLE_LOCATIONS)
       radv_emit_sample_locations(cmd_buffer);
 
-   if (states & RADV_CMD_DIRTY_DYNAMIC_LINE_STIPPLE)
+   if (states & (RADV_CMD_DIRTY_DYNAMIC_LINE_STIPPLE |
+                 RADV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY))
       radv_emit_line_stipple(cmd_buffer);
 
    if (states & (RADV_CMD_DIRTY_DYNAMIC_CULL_MODE | RADV_CMD_DIRTY_DYNAMIC_FRONT_FACE |



More information about the mesa-commit mailing list