diff options
author | Eric Anholt <[email protected]> | 2010-09-27 21:35:54 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-09-28 09:33:30 -0700 |
commit | 1723fdb3f0004a685351d005ba0f5bfc1c2a852e (patch) | |
tree | aa761ab81f74824680cf3012c34bfb484cedd5db /src/mesa/drivers/dri | |
parent | e10508812aed4c41c62ea27ac540c8d079bece07 (diff) |
i965: Apply the same set of lowering passes to new FS as to Mesa IR.
While much of this we will want to support natively, this should make
the task of reaching the Mesa IR backend's quality easier.
Fixes:
glsl-fs-main-return.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index c324be210a0..31f5bbf5871 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -141,7 +141,22 @@ brw_link_shader(GLcontext *ctx, struct gl_shader_program *prog) do { progress = false; + progress = do_lower_jumps(shader->ir, true, true, + true, /* main return */ + false, /* continue */ + false /* loops */ + ) || progress; + progress = do_common_optimization(shader->ir, true, 32) || progress; + + progress = lower_noise(shader->ir) || progress; + progress = + lower_variable_index_to_cond_assign(shader->ir, + GL_TRUE, /* input */ + GL_TRUE, /* output */ + GL_TRUE, /* temp */ + GL_TRUE /* uniform */ + ) || progress; } while (progress); validate_ir_tree(shader->ir); |