gallium: add PIPE_CAP_PSIZ_CLAMPED
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Sat, 12 Oct 2019 07:01:59 +0000 (03:01 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 3 Mar 2020 12:28:23 +0000 (12:28 +0000)
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 <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

src/gallium/auxiliary/util/u_screen.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_extensions.c

index d94f082ba9631279682050f5a500dff55c6aa003..2204c07b1fb34c7afbc6eb065f2a0921d72a17af 100644 (file)
@@ -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:
index 7ae6dd4c9f54ae827de8feb58f8257cb1611301f..2195d728ef7661c3151d45bf068d5f6fb45eb236 100644 (file)
@@ -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,
 };
 
 /**
index 229319af690766a9f90c49df3c051bce131c10ec..7b44c1b4b50446ea2ec1ad8829bb157c102fd8f3 100644 (file)
@@ -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;
       }
    }