summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/program/prog_statevars.c4
-rw-r--r--src/mesa/program/prog_statevars.h1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 85ef22db9c2..4d2fdb9f4a0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3762,6 +3762,7 @@ struct gl_constants
GLuint MaxTessPatchComponents;
GLuint MaxTessControlTotalOutputComponents;
bool LowerTessLevel; /**< Lower gl_TessLevel* from float[n] to vecn? */
+ bool LowerTCSPatchVerticesIn; /**< Lower gl_PatchVerticesIn to a uniform */
bool LowerTESPatchVerticesIn; /**< Lower gl_PatchVerticesIn to a uniform */
bool PrimitiveRestartForPatches;
bool LowerCsDerivedVariables; /**< Lower gl_GlobalInvocationID and
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index 23e3015146f..8dddc0b86a9 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -598,6 +598,10 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
}
return;
+ case STATE_TCS_PATCH_VERTICES_IN:
+ val[0].i = ctx->TessCtrlProgram.patch_vertices;
+ return;
+
case STATE_TES_PATCH_VERTICES_IN:
if (ctx->TessCtrlProgram._Current)
val[0].i = ctx->TessCtrlProgram._Current->VerticesOut;
diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h
index 4b27527b1f9..e716d9070a2 100644
--- a/src/mesa/program/prog_statevars.h
+++ b/src/mesa/program/prog_statevars.h
@@ -128,6 +128,7 @@ typedef enum gl_state_index_ {
STATE_PT_BIAS, /**< Pixel transfer RGBA bias */
STATE_FB_SIZE, /**< (width-1, height-1, 0, 0) */
STATE_FB_WPOS_Y_TRANSFORM, /**< (1, 0, -1, height) if a FBO is bound, (-1, height, 1, 0) otherwise */
+ STATE_TCS_PATCH_VERTICES_IN, /**< gl_PatchVerticesIn for TCS (integer) */
STATE_TES_PATCH_VERTICES_IN, /**< gl_PatchVerticesIn for TES (integer) */
STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */
} gl_state_index;