Gallium: Add new CAP that indicated whether IO array definitions can be shriked
authorGert Wollny <gert.wollny@collabora.com>
Tue, 15 Jan 2019 09:31:16 +0000 (10:31 +0100)
committerGert Wollny <gert.wollny@collabora.com>
Wed, 10 Apr 2019 09:09:40 +0000 (11:09 +0200)
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@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/auxiliary/util/u_screen.c
src/gallium/docs/source/screen.rst
src/gallium/include/pipe/p_defines.h

index 43310f3e87909cf6a599b973cda31fb4aea93b36..a449db856f66fdb38ecf8f593c12e09588f7fcc0 100644 (file)
@@ -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:
index 7d3b262d240938b25b22cbd7a4eb0029182c9128..f29c05756a82d992a7eed50e9f6c8db6ce6138ea 100644 (file)
@@ -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:
 
index 695bb2b3f18b5498f4fd39f33d7b119c0571fe60..feb30693a96d33c0fa0df758df25b24576484665 100644 (file)
@@ -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,
 };
 
 /**