summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2014-01-08 10:00:28 -0800
committerPaul Berry <[email protected]>2014-01-09 09:31:01 -0800
commit84732a982c3eeaca2e2809532c8422dc5f7045c1 (patch)
tree851c411dc92ad2192d2c63db0898dec46a200611 /src/glsl/builtin_variables.cpp
parent9b96be595b93544266436ec3b22b2cbd349d180c (diff)
mesa: replace ctx->Const.{Vertex,Fragment,Geomtery}Program with an array.
These are replaced with ctx->Const.Program[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In patches to follow, this will allow us to replace a lot of ad-hoc logic with a variable index into the array. With the exception of the changes to mtypes.h, this patch was generated entirely by the command: find src -type f '(' -iname '*.c' -o -iname '*.cpp' -o -iname '*.py' \ -o -iname '*.y' ')' -print0 | xargs -0 sed -i \ -e 's/Const\.VertexProgram/Const.Program[MESA_SHADER_VERTEX]/g' \ -e 's/Const\.GeometryProgram/Const.Program[MESA_SHADER_GEOMETRY]/g' \ -e 's/Const\.FragmentProgram/Const.Program[MESA_SHADER_FRAGMENT]/g' Suggested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r--src/glsl/builtin_variables.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 1a9489e53da..f630923eda4 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -554,9 +554,9 @@ builtin_variable_generator::generate_constants()
*/
if (state->is_version(0, 300)) {
add_const("gl_MaxVertexOutputVectors",
- state->ctx->Const.VertexProgram.MaxOutputComponents / 4);
+ state->ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents / 4);
add_const("gl_MaxFragmentInputVectors",
- state->ctx->Const.FragmentProgram.MaxInputComponents / 4);
+ state->ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents / 4);
} else {
add_const("gl_MaxVaryingVectors",
state->ctx->Const.MaxVarying);