From 5d6b0e7f1b1d8eaaded76964989a7adf4ed71662 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 10 Sep 2013 12:16:57 -0500 Subject: glsl: Remove glsl_parser_state MaxVaryingFloats field Pull the data directly from the context like the other varying related limits. The parser state shadow copies were added back when the parser state didn't have a pointer to the context. There's no reason to do it now days. Signed-off-by: Ian Romanick Reviewed-by: Paul Berry --- src/glsl/builtin_variables.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/glsl/builtin_variables.cpp') diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index a75bb6ddab..cb970fba31 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -501,7 +501,8 @@ builtin_variable_generator::generate_constants() add_const("gl_MaxFragmentInputVectors", state->ctx->Const.FragmentProgram.MaxInputComponents / 4); } else { - add_const("gl_MaxVaryingVectors", state->Const.MaxVaryingFloats / 4); + add_const("gl_MaxVaryingVectors", + state->ctx->Const.MaxVarying); } } else { add_const("gl_MaxVertexUniformComponents", @@ -510,7 +511,7 @@ builtin_variable_generator::generate_constants() /* Note: gl_MaxVaryingFloats was deprecated in GLSL 1.30+, but not * removed */ - add_const("gl_MaxVaryingFloats", state->Const.MaxVaryingFloats); + add_const("gl_MaxVaryingFloats", state->ctx->Const.MaxVarying * 4); add_const("gl_MaxFragmentUniformComponents", state->Const.MaxFragmentUniformComponents); @@ -531,7 +532,7 @@ builtin_variable_generator::generate_constants() if (state->is_version(130, 0)) { add_const("gl_MaxClipDistances", state->Const.MaxClipPlanes); - add_const("gl_MaxVaryingComponents", state->Const.MaxVaryingFloats); + add_const("gl_MaxVaryingComponents", state->ctx->Const.MaxVarying * 4); } if (compatibility) { -- cgit v1.2.3