diff options
author | Paul Berry <[email protected]> | 2014-01-08 10:00:28 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2014-01-09 09:31:01 -0800 |
commit | 84732a982c3eeaca2e2809532c8422dc5f7045c1 (patch) | |
tree | 851c411dc92ad2192d2c63db0898dec46a200611 /src/mesa/swrast/s_context.c | |
parent | 9b96be595b93544266436ec3b22b2cbd349d180c (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/mesa/swrast/s_context.c')
-rw-r--r-- | src/mesa/swrast/s_context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 8934088df31..fdf9b370a81 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -794,9 +794,9 @@ _swrast_CreateContext( struct gl_context *ctx ) swrast->PointSpan.facing = 0; swrast->PointSpan.array = swrast->SpanArrays; - init_program_native_limits(&ctx->Const.VertexProgram); - init_program_native_limits(&ctx->Const.GeometryProgram); - init_program_native_limits(&ctx->Const.FragmentProgram); + init_program_native_limits(&ctx->Const.Program[MESA_SHADER_VERTEX]); + init_program_native_limits(&ctx->Const.Program[MESA_SHADER_GEOMETRY]); + init_program_native_limits(&ctx->Const.Program[MESA_SHADER_FRAGMENT]); ctx->swrast_context = swrast; |