Module: Mesa
Branch: main
Commit: 0ca33a6c0d409aa5d49794b6f4d8018c634fb0fb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ca33a6c0d409aa5d49794b6f4d8018c634fb0fb

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Aug 11 14:13:02 2022 +0200

radv: copy line stipple factor/pattern only if the state isn't dynamic

If line stipple is enabled and the state is dynamic we don't have to
copy factor/pattern to the dynamic state struct.

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-By: Mike Blumenkrantz <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18007>

---

 src/amd/vulkan/radv_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index ebeaafed2dc..afd8fa0c2e8 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2151,7 +2151,7 @@ radv_pipeline_init_dynamic_state(struct 
radv_graphics_pipeline *pipeline,
       }
    }
 
-   if (needed_states & RADV_DYNAMIC_LINE_STIPPLE) {
+   if (states & RADV_DYNAMIC_LINE_STIPPLE) {
       dynamic->line_stipple.factor = info->rs.line_stipple_factor;
       dynamic->line_stipple.pattern = info->rs.line_stipple_pattern;
    }

Reply via email to