diff options
author | Kenneth Graunke <[email protected]> | 2014-04-06 23:25:00 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-04-08 00:02:03 -0700 |
commit | 169c645f12337cdc3e02b628f9cde6a9fb72acc2 (patch) | |
tree | 6495da83c2faef2f37016d0a343947b4189dde7d /src/mesa | |
parent | 40d9337406709d0e5e143c51dc5d57921a91aab9 (diff) |
glsl: Pass ctx->Const.NativeIntegers to do_common_optimization().
The next few patches will introduce an optimization that only works when
integers are not represented as floating point values.
v2: Re-word-wrap a line, as requested by Ian Romanick.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 3 | ||||
-rw-r--r-- | src/mesa/main/ff_fragment_shader.cpp | 3 | ||||
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index ca448d02fb3..d8eecb39403 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -202,7 +202,8 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) ) || progress; progress = do_common_optimization(shader->base.ir, true, true, 32, - &ctx->ShaderCompilerOptions[stage]) + &ctx->ShaderCompilerOptions[stage], + ctx->Const.NativeIntegers) || progress; } while (progress); diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 1d2ad604b5c..e41dcefb0c6 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -1344,7 +1344,8 @@ create_new_program(struct gl_context *ctx, struct state_key *key) const struct gl_shader_compiler_options *options = &ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT]; - while (do_common_optimization(p.shader->ir, false, false, 32, options)) + while (do_common_optimization(p.shader->ir, false, false, 32, options, + ctx->Const.NativeIntegers)) ; reparent_ir(p.shader->ir, p.shader->ir); diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 0923357b1bb..675e58e2a97 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3008,7 +3008,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) progress = do_common_optimization(ir, true, true, options->MaxUnrollIterations, - options) + options, ctx->Const.NativeIntegers) || progress; progress = lower_quadop_vector(ir, true) || progress; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index c3e36eceab4..28e8f1ecbc5 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5358,7 +5358,9 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) progress = do_lower_jumps(ir, true, true, options->EmitNoMainReturn, options->EmitNoCont, options->EmitNoLoops) || progress; progress = do_common_optimization(ir, true, true, - options->MaxUnrollIterations, options) + options->MaxUnrollIterations, + options, + ctx->Const.NativeIntegers) || progress; progress = lower_if_to_cond_assign(ir, options->MaxIfDepth) || progress; |