Commit babf7357 authored by Louis-Francis Ratté-Boulianne's avatar Louis-Francis Ratté-Boulianne Committed by Marge Bot

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's avatarLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
Part-of: <!2433>
parent 4ce339e7
......@@ -417,6 +417,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_PACKED_STREAM_OUTPUT:
return 1;
case PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED:
return 0;
default:
unreachable("bad PIPE_CAP_*");
}
......
......@@ -916,6 +916,7 @@ enum pipe_cap
PIPE_CAP_FRONTEND_NOOP,
PIPE_CAP_NIR_IMAGES_AS_DEREF,
PIPE_CAP_PACKED_STREAM_OUTPUT,
PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED,
};
/**
......
......@@ -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 =
......
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