gallium: Add PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL
authorAndreas Baierl <ichgeh@imkreisrum.de>
Tue, 4 Jun 2019 11:25:28 +0000 (13:25 +0200)
committerQiang Yu <yuq825@gmail.com>
Thu, 18 Jul 2019 13:20:39 +0000 (13:20 +0000)
This adds an option to treat gl_PointCoord as a system value.

Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/util/u_screen.c
src/gallium/docs/source/screen.rst
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_extensions.c

index 2736deb2c6a880dc3a58602886d1146599117a46..810ba8d175127e20bf44a6f631865b5904ccc3d7 100644 (file)
@@ -227,6 +227,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
    case PIPE_CAP_MULTI_DRAW_INDIRECT:
    case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
    case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
+   case PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL:
    case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
       return 0;
 
index b993087ac3c95b4f49a6ca89f45e9202959a4bd6..ba7a9d440d46d537b53171720759b74177938ac0 100644 (file)
@@ -303,6 +303,8 @@ The integer capabilities:
   TGSI opcodes are supported.
 * ``PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL``: If state trackers should use
   a system value for the POSITION fragment shader input.
+* ``PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL``: If state trackers should use
+  a system value for the POINT fragment shader input.
 * ``PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL``: If state trackers should use
   a system value for the FACE fragment shader input.
   Also, the FACE system value is integer, not float.
index d6e33ce9daa9462d8fb3ab92f9f5d87dfc47c26d..0271a08f690cefe06868803bc2563958e370f1bd 100644 (file)
@@ -798,6 +798,7 @@ enum pipe_cap
    PIPE_CAP_MULTI_DRAW_INDIRECT,
    PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS,
    PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL,
+   PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL,
    PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL,
    PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT,
    PIPE_CAP_INVALIDATE_BUFFER,
index 3b771081592d6f18ab0a55fbbeb2aefe4b33c277..867ec49eb1c0b7c5764958079f23c8cf7aaf7fd1 100644 (file)
@@ -444,6 +444,8 @@ void st_init_limits(struct pipe_screen *screen,
 
    c->GLSLFragCoordIsSysVal =
       screen->get_param(screen, PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL);
+   c->GLSLPointCoordIsSysVal =
+      screen->get_param(screen, PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL);
    c->GLSLFrontFacingIsSysVal =
       screen->get_param(screen, PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL);