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

Author: Emma Anholt <[email protected]>
Date:   Thu Sep  1 11:14:40 2022 -0700

zink: Don't upload shader immediate arrays through UBO 0.

Trust the host vulkan driver to load it through whatever way it finds to
be most efficient.  Saves upload on the frontend when other uniforms
change.

Reviewed-by: Mike Blumenkrantz <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18374>

---

 src/gallium/drivers/zink/zink_screen.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_screen.c 
b/src/gallium/drivers/zink/zink_screen.c
index e685561d244..2fdb2321cf0 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -593,6 +593,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap 
param)
    case PIPE_CAP_GL_CLAMP:
       return 0;
 
+   case PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF:
+      return 0; /* Assume that the vk driver is capable of moving imm arrays 
to some sort of constant storage on its own. */
+
    case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: {
       enum pipe_quirk_texture_border_color_swizzle quirk = 
PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_ALPHA_NOT_W;
       if (!screen->info.border_color_feats.customBorderColorWithoutFormat)

Reply via email to