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

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Mar 24 16:58:11 2023 -0400

zink: explicitly pass null velems when creating pipelines with dynamic vinput

this may or may not be a usable pointer, and it's not being read, so
don't pass it at all

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>

---

 src/gallium/drivers/zink/zink_program_state.hpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_program_state.hpp 
b/src/gallium/drivers/zink/zink_program_state.hpp
index 4137d3d7e94..7b57856ae3a 100644
--- a/src/gallium/drivers/zink/zink_program_state.hpp
+++ b/src/gallium/drivers/zink/zink_program_state.hpp
@@ -212,7 +212,10 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
          pipeline = zink_create_gfx_pipeline_combined(screen, prog, 
ikey->pipeline, &gkey->pipeline, 1, okey->pipeline, false);
       } else {
          /* optimize by default only when expecting precompiles in order to 
reduce stuttering */
-         pipeline = zink_create_gfx_pipeline(screen, prog, state, 
state->element_state->binding_map, vkmode, !HAVE_LIB);
+         if (DYNAMIC_STATE != ZINK_DYNAMIC_VERTEX_INPUT2 && DYNAMIC_STATE != 
ZINK_DYNAMIC_VERTEX_INPUT)
+            pipeline = zink_create_gfx_pipeline(screen, prog, state, 
state->element_state->binding_map, vkmode, !HAVE_LIB);
+         else
+            pipeline = zink_create_gfx_pipeline(screen, prog, state, NULL, 
vkmode, !HAVE_LIB);
       }
       if (pipeline == VK_NULL_HANDLE)
          return VK_NULL_HANDLE;

Reply via email to