From 3b22146dc714b6090f7423abbc4df53d7d1fdaa9 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 9 Jan 2014 11:16:27 -0800 Subject: mesa: Replace ctx->Shader.Current{Vertex,Fragment,Geometry}Program with an array. These are replaced with ctx->Shader.CurrentProgram[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' ')' \ -print0 | xargs -0 sed -i \ -e 's/\.CurrentVertexProgram/.CurrentProgram[MESA_SHADER_VERTEX]/g' \ -e 's/\.CurrentGeometryProgram/.CurrentProgram[MESA_SHADER_GEOMETRY]/g' \ -e 's/\.CurrentFragmentProgram/.CurrentProgram[MESA_SHADER_FRAGMENT]/g' Reviewed-by: Chris Forbes Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/state_tracker/st_draw.c') diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 46257e0f5f6..6a7a4efd6e1 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -132,9 +132,9 @@ static void check_uniforms(struct gl_context *ctx) { struct gl_shader_program *shProg[3] = { - ctx->Shader.CurrentVertexProgram, - ctx->Shader.CurrentGeometryProgram, - ctx->Shader.CurrentFragmentProgram, + ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX], + ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY], + ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT], }; unsigned j; -- cgit v1.2.3