From 585a21ceca03b47f1b00579e43dd105bfd116fd5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= Date: Sat, 12 Oct 2019 03:01:59 -0400 Subject: [PATCH] gallium: add PIPE_CAP_PSIZ_CLAMPED MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/gallium/auxiliary/util/u_screen.c | 1 + src/gallium/include/pipe/p_defines.h | 1 + src/mesa/state_tracker/st_extensions.c | 2 ++ 3 files changed, 4 insertions(+) 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; } } -- 2.30.2