summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-03-20 17:43:12 -0600
committerBrian Paul <[email protected]>2012-03-21 13:46:36 -0600
commit7feabfe23dc54960abba34755f484f786575ac49 (patch)
tree7345407a914f78e7071e7f9acdaaf6177e6d91c6 /src/glsl/linker.cpp
parent9bd38f3c674b91a89d9b572c5722faa00fb86654 (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 <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 471525e9e21..8278e43adb8 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2294,7 +2294,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))
;
}