summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-05-13 07:52:08 -0700
committerPaul Berry <[email protected]>2013-05-13 07:55:37 -0700
commitb0bb6103d23c16d23b0ec617746b4b0d1c22075d (patch)
tree2c1841143004c6bda6e7a95ab336ee3674c35e30
parente413d3f15ca72b82ca29e43f010597a83427d5e8 (diff)
glsl: Fix "make check" breakage after adding options to do_common_optimization.
Commit b765740 (glsl: Pass struct shader_compiler_options into do_common_optimization.) added a new parameter to do_common_optimization() but didn't update test_optpass.cpp, causing "make check" to break. This patch makes the proper updates to test_optpass.cpp so that the build succeeds again.
-rw-r--r--src/glsl/test_optpass.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/glsl/test_optpass.cpp b/src/glsl/test_optpass.cpp
index 117b0b006bc..fc10cbbde57 100644
--- a/src/glsl/test_optpass.cpp
+++ b/src/glsl/test_optpass.cpp
@@ -54,7 +54,8 @@ static string read_stdin_to_eof()
}
static GLboolean
-do_optimization(struct exec_list *ir, const char *optimization)
+do_optimization(struct exec_list *ir, const char *optimization,
+ const struct gl_shader_compiler_options *options)
{
int int_0;
int int_1;
@@ -64,7 +65,7 @@ do_optimization(struct exec_list *ir, const char *optimization)
if (sscanf(optimization, "do_common_optimization ( %d , %d ) ",
&int_0, &int_1) == 2) {
- return do_common_optimization(ir, int_0 != 0, false, int_1);
+ return do_common_optimization(ir, int_0 != 0, false, int_1, options);
} else if (strcmp(optimization, "do_algebraic") == 0) {
return do_algebraic(ir);
} else if (strcmp(optimization, "do_constant_folding") == 0) {
@@ -141,7 +142,8 @@ do_optimization(struct exec_list *ir, const char *optimization)
static GLboolean
do_optimization_passes(struct exec_list *ir, char **optimizations,
- int num_optimizations, bool quiet)
+ int num_optimizations, bool quiet,
+ const struct gl_shader_compiler_options *options)
{
GLboolean overall_progress = false;
@@ -150,7 +152,7 @@ do_optimization_passes(struct exec_list *ir, char **optimizations,
if (!quiet) {
printf("*** Running optimization %s...", optimization);
}
- GLboolean progress = do_optimization(ir, optimization);
+ GLboolean progress = do_optimization(ir, optimization, options);
if (!quiet) {
printf("%s\n", progress ? "progress" : "no progress");
}
@@ -240,9 +242,11 @@ int test_optpass(int argc, char **argv)
/* Optimization passes */
if (!state->error) {
GLboolean progress;
+ const struct gl_shader_compiler_options *options =
+ &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader_type)];
do {
progress = do_optimization_passes(shader->ir, &argv[optind],
- argc - optind, quiet != 0);
+ argc - optind, quiet != 0, options);
} while (loop && progress);
}