summaryrefslogtreecommitdiffstats
path: root/src/glsl/standalone_scaffolding.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2014-01-08 10:00:28 -0800
committerPaul Berry <stereotype441@gmail.com>2014-01-09 09:31:01 -0800
commit84732a982c3eeaca2e2809532c8422dc5f7045c1 (patch)
tree851c411dc92ad2192d2c63db0898dec46a200611 /src/glsl/standalone_scaffolding.cpp
parent9b96be595b93544266436ec3b22b2cbd349d180c (diff)
downloadexternal_mesa3d-84732a982c3eeaca2e2809532c8422dc5f7045c1.zip
external_mesa3d-84732a982c3eeaca2e2809532c8422dc5f7045c1.tar.gz
external_mesa3d-84732a982c3eeaca2e2809532c8422dc5f7045c1.tar.bz2
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 <brianp@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/standalone_scaffolding.cpp')
-rw-r--r--src/glsl/standalone_scaffolding.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 6a71745..257d2e7 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -127,16 +127,16 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Const.MaxClipPlanes = 6;
ctx->Const.MaxTextureUnits = 2;
ctx->Const.MaxTextureCoordUnits = 2;
- ctx->Const.VertexProgram.MaxAttribs = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 16;
- ctx->Const.VertexProgram.MaxUniformComponents = 512;
- ctx->Const.VertexProgram.MaxOutputComponents = 32;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 512;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 32;
ctx->Const.MaxVarying = 8; /* == gl_MaxVaryingFloats / 4 */
- ctx->Const.VertexProgram.MaxTextureImageUnits = 0;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 0;
ctx->Const.MaxCombinedTextureImageUnits = 2;
- ctx->Const.FragmentProgram.MaxTextureImageUnits = 2;
- ctx->Const.FragmentProgram.MaxUniformComponents = 64;
- ctx->Const.FragmentProgram.MaxInputComponents = 32;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = 2;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 64;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 32;
ctx->Const.MaxDrawBuffers = 1;