diff options
author | Brian Paul <brianp@vmware.com> | 2012-03-20 17:43:12 -0600 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2012-05-18 16:08:33 -0700 |
commit | 9405567c28d188a7cf4b25f8a45e8165142463da (patch) | |
tree | aaa450fdc34a4f7cdae95c7c75297237b5bf99c6 | |
parent | e69758260b0403d47ec61692e1fc18bcbb14865e (diff) |
glsl: propagate MaxUnrollIterations to the optimizer's loop unroller
Instead of the hard-coded value of 32. Note that MaxUnrollIterations
defaults to 32 so there's no net change. But the gallium state tracker
can override this.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 7feabfe23dc54960abba34755f484f786575ac49)
-rw-r--r-- | src/glsl/linker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 509575192e7..f028ab37d82 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -2263,7 +2263,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) if (ctx->ShaderCompilerOptions[i].LowerClipDistance) lower_clip_distance(prog->_LinkedShaders[i]->ir); - while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, 32)) + unsigned max_unroll = ctx->ShaderCompilerOptions[i].MaxUnrollIterations; + + while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, max_unroll)) ; } |