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/glsl/ast_to_hir.cpp | |
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/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 3e79f1a8ed5..1ac60478aa7 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1986,13 +1986,13 @@ validate_binding_qualifier(struct _mesa_glsl_parse_state *state, unsigned limit = 0; switch (state->stage) { case MESA_SHADER_VERTEX: - limit = ctx->Const.VertexProgram.MaxTextureImageUnits; + limit = ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits; break; case MESA_SHADER_GEOMETRY: - limit = ctx->Const.GeometryProgram.MaxTextureImageUnits; + limit = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits; break; case MESA_SHADER_FRAGMENT: - limit = ctx->Const.FragmentProgram.MaxTextureImageUnits; + limit = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits; break; } |