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 <chrisf@ijw.co.nz> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -1196,9 +1196,9 @@ void
|
||||
st_print_shaders(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;
|
||||
|
||||
|
Reference in New Issue
Block a user