diff options
author | Kenneth Graunke <[email protected]> | 2016-05-26 20:21:58 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-06-15 12:44:09 -0700 |
commit | 0be210513797d3a0245588df915b9510c201bea4 (patch) | |
tree | 11ba21e87e653a08fee8b2432d50bf588dacf2a6 /src/mesa/program/prog_statevars.c | |
parent | d794072b3e1f27b96aaf2c476fcd5dcc5fd9d445 (diff) |
glsl: Optionally lower TES gl_PatchVerticesIn to a uniform.
i965 has no special hardware for this, so we need to pass this value in
as a uniform (unless the TES is linked against a TCS, in which case the
linker can just replace this with a constant).
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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index 27ff3339eaf..23e3015146f 100644 --- a/src/mesa/program/prog_statevars.c +++ b/src/mesa/program/prog_statevars.c @@ -598,6 +598,13 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], } return; + case STATE_TES_PATCH_VERTICES_IN: + if (ctx->TessCtrlProgram._Current) + val[0].i = ctx->TessCtrlProgram._Current->VerticesOut; + else + val[0].i = ctx->TessCtrlProgram.patch_vertices; + return; + /* XXX: make sure new tokens added here are also handled in the * _mesa_program_state_flags() switch, below. */ |