From: Ian Romanick Date: Tue, 10 Sep 2013 17:13:04 +0000 (-0500) Subject: glsl: Set gl_MaxVertexOutputs from VertexProgram.MaxOutputComponents etc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7db50171be05016fc0a4501c0fd62ef2bed78fbf;p=mesa.git glsl: Set gl_MaxVertexOutputs from VertexProgram.MaxOutputComponents etc gl_MaxVertexOutputVectors => ctx->Const.VertexProgram.MaxOutputComponents gl_MaxFragmentInputVectors => ctx->Const.FragmentProgram.MaxInputComponents v2: Add types so that the code compiles. Pointed out by Brian. v3: Leave gl_MaxVaryingFloats et al. as-is. Suggested by Paul. Signed-off-by: Ian Romanick Reviewed-by: Brian Paul [v2] Reviewed-by: Marek Olšák [v2] Reviewed-by: Paul Berry [v2] --- diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 6a808c072a2..a75bb6ddab4 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -497,9 +497,9 @@ builtin_variable_generator::generate_constants() */ if (state->is_version(0, 300)) { add_const("gl_MaxVertexOutputVectors", - state->Const.MaxVaryingFloats / 4); + state->ctx->Const.VertexProgram.MaxOutputComponents / 4); add_const("gl_MaxFragmentInputVectors", - state->Const.MaxVaryingFloats / 4); + state->ctx->Const.FragmentProgram.MaxInputComponents / 4); } else { add_const("gl_MaxVaryingVectors", state->Const.MaxVaryingFloats / 4); }