gallium: Add PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED

Tells whether or not the driver can handle gl_LocalInvocationIndex and
gl_GlobalInvocationID.  If not supported (the default), state tracker
will lower those on behalf of the driver.

v2: Add case to u_screen.c.  (Anholt)
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
parent f03b21ae
......@@ -328,6 +328,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_IMAGE_LOAD_FORMATTED:
case PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA:
case PIPE_CAP_FRAGMENT_SHADER_INTERLOCK:
case PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED:
return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
......
......@@ -528,6 +528,9 @@ The integer capabilities:
OpenMAX should use a compute-based blit instead of pipe_context::blit.
* ``PIPE_CAP_FRAGMENT_SHADER_INTERLOCK``: True if fragment shader interlock
functionality is supported.
* ``PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED``: True if driver handles
gl_LocalInvocationIndex and gl_GlobalInvocationID. Otherwise, state tracker will
lower those system values.
.. _pipe_capf:
......
......@@ -885,6 +885,7 @@ enum pipe_cap
PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA,
PIPE_CAP_FRAGMENT_SHADER_INTERLOCK,
PIPE_CAP_FBFETCH_COHERENT,
PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED,
};
/**
......
......@@ -348,7 +348,8 @@ void st_init_limits(struct pipe_screen *screen,
screen->get_param(screen, PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS);
c->LowerTessLevel =
!screen->get_param(screen, PIPE_CAP_NIR_COMPACT_ARRAYS);
c->LowerCsDerivedVariables = true;
c->LowerCsDerivedVariables =
!screen->get_param(screen, PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED);
c->PrimitiveRestartForPatches =
screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment