From: Louis-Francis Ratté-Boulianne Date: Sat, 12 Oct 2019 07:01:59 +0000 (-0400) Subject: gallium: add PIPE_CAP_PSIZ_CLAMPED X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=585a21ceca03b47f1b00579e43dd105bfd116fd5;p=mesa.git gallium: add PIPE_CAP_PSIZ_CLAMPED This new capability indicates that the point size has been clamped. This also means that the gl_PointSize has been modified and that its value should be lowered for transform feedback, if needed. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Alyssa Rosenzweig Acked-by: Daniel Stone Part-of: --- diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index d94f082ba96..2204c07b1fb 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -418,6 +418,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, return 1; case PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED: + case PIPE_CAP_PSIZ_CLAMPED: return 0; default: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 7ae6dd4c9f5..2195d728ef7 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -917,6 +917,7 @@ enum pipe_cap PIPE_CAP_NIR_IMAGES_AS_DEREF, PIPE_CAP_PACKED_STREAM_OUTPUT, PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED, + PIPE_CAP_PSIZ_CLAMPED, }; /** diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 229319af690..7b44c1b4b50 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -335,6 +335,8 @@ void st_init_limits(struct pipe_screen *screen, if (sh == MESA_SHADER_VERTEX) { if (screen->get_param(screen, PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED)) options->LowerBuiltinVariablesXfb |= VARYING_BIT_POS; + if (screen->get_param(screen, PIPE_CAP_PSIZ_CLAMPED)) + options->LowerBuiltinVariablesXfb |= VARYING_BIT_PSIZ; } }