mesa: replace ctx->Const.{Vertex,Fragment,Geomtery}Program with an array.
authorPaul Berry <stereotype441@gmail.com>
Wed, 8 Jan 2014 18:00:28 +0000 (10:00 -0800)
committerPaul Berry <stereotype441@gmail.com>
Thu, 9 Jan 2014 17:31:01 +0000 (09:31 -0800)
commit84732a982c3eeaca2e2809532c8422dc5f7045c1
tree851c411dc92ad2192d2c63db0898dec46a200611
parent9b96be595b93544266436ec3b22b2cbd349d180c
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>
38 files changed:
src/glsl/ast_to_hir.cpp
src/glsl/builtin_variables.cpp
src/glsl/glsl_parser_extras.cpp
src/glsl/link_atomics.cpp
src/glsl/link_varyings.cpp
src/glsl/linker.cpp
src/glsl/main.cpp
src/glsl/standalone_scaffolding.cpp
src/mesa/drivers/dri/i915/i830_context.c
src/mesa/drivers/dri/i915/i915_context.c
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/nouveau/nv04_context.c
src/mesa/drivers/dri/nouveau/nv10_context.c
src/mesa/drivers/dri/nouveau/nv20_context.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/drivers/dri/radeon/radeon_state.c
src/mesa/main/arbprogram.c
src/mesa/main/context.c
src/mesa/main/ffvertex_prog.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/main/shader_query.cpp
src/mesa/main/shaderapi.c
src/mesa/main/texenv.c
src/mesa/main/varray.c
src/mesa/main/version.c
src/mesa/program/program.c
src/mesa/program/program_parse.y
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
src/mesa/state_tracker/st_mesa_to_tgsi.c
src/mesa/swrast/s_context.c
src/mesa/swrast/s_texcombine.c
src/mesa/tnl/t_vb_program.c