diff options
author | Paul Berry <stereotype441@gmail.com> | 2014-01-08 10:00:28 -0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2014-01-09 09:31:01 -0800 |
commit | 84732a982c3eeaca2e2809532c8422dc5f7045c1 (patch) | |
tree | 851c411dc92ad2192d2c63db0898dec46a200611 /src/glsl/link_varyings.cpp | |
parent | 9b96be595b93544266436ec3b22b2cbd349d180c (diff) | |
download | external_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/link_varyings.cpp')
-rw-r--r-- | src/glsl/link_varyings.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 7a31f97..6672b87 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -1252,10 +1252,10 @@ check_against_output_limit(struct gl_context *ctx, unsigned max_output_components; switch (producer->Stage) { case MESA_SHADER_VERTEX: - max_output_components = ctx->Const.VertexProgram.MaxOutputComponents; + max_output_components = ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents; break; case MESA_SHADER_GEOMETRY: - max_output_components = ctx->Const.GeometryProgram.MaxOutputComponents; + max_output_components = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents; break; case MESA_SHADER_FRAGMENT: default: @@ -1301,10 +1301,10 @@ check_against_input_limit(struct gl_context *ctx, unsigned max_input_components; switch (consumer->Stage) { case MESA_SHADER_GEOMETRY: - max_input_components = ctx->Const.GeometryProgram.MaxInputComponents; + max_input_components = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents; break; case MESA_SHADER_FRAGMENT: - max_input_components = ctx->Const.FragmentProgram.MaxInputComponents; + max_input_components = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents; break; case MESA_SHADER_VERTEX: default: |