diff options
author | Louis-Francis Ratté-Boulianne <[email protected]> | 2019-10-12 02:59:53 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-03 12:28:23 +0000 |
commit | babf7357d24b88a548f50aebca74c6ffd8f81d52 (patch) | |
tree | 2ba894362336a57b38fa0eb4d5d8381b665eec67 /src/mesa | |
parent | 4ce339e74118786893b5138db37c09c4f2d830fd (diff) |
gallium: add PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED
This new capability indicates that the nir_lower_viewport_transform
pass is enabled. This also means that the gl_Position value is
modified and should be lowered for transform feedback, if needed.
Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Acked-by: Daniel Stone <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index d44c2c4ee9d..229319af690 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -331,6 +331,11 @@ void st_init_limits(struct pipe_screen *screen, * because it can actually optimize SSBO access. */ options->LowerBufferInterfaceBlocks = !prefer_nir; + + if (sh == MESA_SHADER_VERTEX) { + if (screen->get_param(screen, PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED)) + options->LowerBuiltinVariablesXfb |= VARYING_BIT_POS; + } } c->MaxUserAssignableUniformLocations = |