diff options
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/prog_statevars.c | 7 | ||||
-rw-r--r-- | src/mesa/program/prog_statevars.h | 1 |
2 files changed, 8 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. */ diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h index 6333e632816..4b27527b1f9 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_TES_PATCH_VERTICES_IN, /**< gl_PatchVerticesIn for TES (integer) */ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ } gl_state_index; |