add_input(VARYING_SLOT_FACE, bool_t, "gl_FrontFacing");
if (state->is_version(120, 100)) {
- add_input(VARYING_SLOT_PNTC, vec2_t, GLSL_PRECISION_MEDIUM,
- "gl_PointCoord");
+ if (this->state->ctx->Const.GLSLPointCoordIsSysVal)
+ add_system_value(SYSTEM_VALUE_POINT_COORD, vec2_t,
+ GLSL_PRECISION_MEDIUM, "gl_PointCoord");
+ else
+ add_input(VARYING_SLOT_PNTC, vec2_t, GLSL_PRECISION_MEDIUM,
+ "gl_PointCoord");
}
if (state->has_geometry_shader() || state->EXT_gpu_shader4_enable) {
ENUM(SYSTEM_VALUE_DRAW_ID),
ENUM(SYSTEM_VALUE_INVOCATION_ID),
ENUM(SYSTEM_VALUE_FRAG_COORD),
+ ENUM(SYSTEM_VALUE_POINT_COORD),
ENUM(SYSTEM_VALUE_FRONT_FACE),
ENUM(SYSTEM_VALUE_SAMPLE_ID),
ENUM(SYSTEM_VALUE_SAMPLE_POS),
*/
/*@{*/
SYSTEM_VALUE_FRAG_COORD,
+ SYSTEM_VALUE_POINT_COORD,
SYSTEM_VALUE_FRONT_FACE,
SYSTEM_VALUE_SAMPLE_ID,
SYSTEM_VALUE_SAMPLE_POS,
*/
GLboolean GLSLSkipStrictMaxUniformLimitCheck;
- /** Whether gl_FragCoord and gl_FrontFacing are system values. */
+ /**
+ * Whether gl_FragCoord, gl_PointCoord and gl_FrontFacing
+ * are system values.
+ **/
bool GLSLFragCoordIsSysVal;
+ bool GLSLPointCoordIsSysVal;
bool GLSLFrontFacingIsSysVal;
/**
/* Fragment shader */
case SYSTEM_VALUE_FRAG_COORD:
return TGSI_SEMANTIC_POSITION;
+ case SYSTEM_VALUE_POINT_COORD:
+ return TGSI_SEMANTIC_PCOORD;
case SYSTEM_VALUE_FRONT_FACE:
return TGSI_SEMANTIC_FACE;
case SYSTEM_VALUE_SAMPLE_ID: