gallium: update docs about PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF.
authorEmma Anholt <emma@anholt.net>
Mon, 16 May 2022 23:16:03 +0000 (16:16 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 1 Nov 2022 21:55:56 +0000 (14:55 -0700)
We can provide better guidance on when to (un-)set this given that
everyone's on NIR now.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16539>

docs/gallium/screen.rst
src/gallium/auxiliary/util/u_screen.c

index eb3227f..33ef3a7 100644 (file)
@@ -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.
index 1d40692..4cacc42 100644 (file)
@@ -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: