Commit 35232330 authored by Andreas Baierl's avatar Andreas Baierl Committed by Qiang Yu

gallium: Add PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL

This adds an option to treat gl_PointCoord as a system value.
Signed-off-by: Andreas Baierl's avatarAndreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Qiang Yu's avatarQiang Yu <yuq825@gmail.com>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
parent 3349a60f
......@@ -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;
......
......@@ -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.
......
......@@ -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,
......
......@@ -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);
......
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