Mesa (master): Gallium: Add new CAP that indicated whether IO array definitions can be shriked

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 10 09:22:15 UTC 2019


Module: Mesa
Branch: master
Commit: 872519c663ca813b87c8e2cd1c2ee90eb086e17c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=872519c663ca813b87c8e2cd1c2ee90eb086e17c

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Tue Jan 15 10:31:16 2019 +0100

Gallium: Add new CAP that indicated whether IO array definitions can be shriked

PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS is added to indicate whether the TGSI
pass to shrink IO arrays should be skipped to enforce the originally declared array
sizes and locations instead.

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh at chromium.org>

---

 src/gallium/auxiliary/util/u_screen.c | 1 +
 src/gallium/docs/source/screen.rst    | 4 ++++
 src/gallium/include/pipe/p_defines.h  | 1 +
 3 files changed, 6 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c
index 43310f3e879..a449db856f6 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -322,6 +322,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
    case PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTERS:
    case PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER_BUFFERS:
    case PIPE_CAP_TGSI_ATOMFADD:
+   case PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS:
       return 0;
 
    case PIPE_CAP_MAX_GS_INVOCATIONS:
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index 7d3b262d240..f29c05756a8 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -504,6 +504,10 @@ The integer capabilities:
 * ``PIPE_CAP_COMPUTE_GRID_INFO_LAST_BLOCK``: Whether pipe_grid_info::last_block
   is implemented by the driver. See struct pipe_grid_info for more details.
 * ``PIPE_CAP_COMPUTE_SHADER_DERIVATIVE``: True if the driver supports derivatives (and texture lookups with implicit derivatives) in compute shaders.
+* ``PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS``:  Whether the TGSI pass to shrink IO
+  arrays should be skipped and enforce keeping the declared array sizes instead.
+  A driver might rely on the input mapping that was defined with the original
+  GLSL code.
 
 .. _pipe_capf:
 
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 695bb2b3f18..feb30693a96 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -866,6 +866,7 @@ enum pipe_cap
    PIPE_CAP_MAX_VARYINGS,
    PIPE_CAP_COMPUTE_GRID_INFO_LAST_BLOCK,
    PIPE_CAP_COMPUTE_SHADER_DERIVATIVES,
+   PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS,
 };
 
 /**




More information about the mesa-commit mailing list