summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_statevars.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-05-26 20:21:58 -0700
committerKenneth Graunke <[email protected]>2016-06-15 12:47:37 -0700
commit2b867264d2cce59bd65bd3599ff0e3c5439bc9d4 (patch)
tree5547dade3548cd8da3e7a550786a39fac0c3af3c /src/mesa/program/prog_statevars.c
parent1bc194cd64085d07f1aae319cb6fb3c99d69aaeb (diff)
glsl: Optionally lower TCS gl_PatchVerticesIn to a uniform.
i965 has no special hardware for this, so the best way to implement this is to pass it in via a uniform. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/mesa/program/prog_statevars.c')
-rw-r--r--src/mesa/program/prog_statevars.c4
1 files changed, 4 insertions, 0 deletions
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;