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

Author: Emma Anholt <[email protected]>
Date:   Mon May 16 16:16:03 2022 -0700

gallium: update docs about PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF.

We can provide better guidance on when to (un-)set this given that
everyone's on NIR now.

Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16539>

---

 docs/gallium/screen.rst               | 2 +-
 src/gallium/auxiliary/util/u_screen.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst
index eb3227f7bae..33ef3a7a45a 100644
--- a/docs/gallium/screen.rst
+++ b/docs/gallium/screen.rst
@@ -576,7 +576,7 @@ The integer capabilities:
 * ``PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF``: True if gallium frontends should
   turn arrays whose contents can be deduced at compile time into constant
   buffer loads, or false if the driver can handle such arrays itself in a more
-  efficient manner.
+  efficient manner (such as through nir_opt_large_constants() and 
nir->constant_data).
 * ``PIPE_CAP_GL_SPIRV``: True if the driver supports ARB_gl_spirv extension.
 * ``PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS``: True if the driver supports 
Variable Pointers in SPIR-V shaders.
 * ``PIPE_CAP_DEMOTE_TO_HELPER_INVOCATION``: True if driver supports demote 
keyword in GLSL programs.
diff --git a/src/gallium/auxiliary/util/u_screen.c 
b/src/gallium/auxiliary/util/u_screen.c
index 1d40692bd26..4cacc42fbdb 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -335,7 +335,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen 
*pscreen,
       return 1;
 
    case PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF:
-      /* Don't unset this unless your driver can do better */
+      /* Don't unset this unless your driver can do better, like using 
nir_opt_large_constants() */
       return 1;
 
    case PIPE_CAP_POST_DEPTH_COVERAGE:

Reply via email to