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 <kenneth@whitecape.org> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user