diff options
author | Matt Turner <[email protected]> | 2014-11-21 12:20:53 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-11-24 14:07:32 -0800 |
commit | 56ac25918aea37a3c2c52f99fc285f2475be9128 (patch) | |
tree | 9fa9acd724f26135013cc9e7d0674e0200d0d9cd /src/mesa/drivers/dri/i965/brw_fs_generator.cpp | |
parent | f5bef2d2e53fc43cbdf15914e8886fc51f77b546 (diff) |
i965: Don't overwrite the math function with conditional mod.
Ben was asking about the undocumented restriction that the math
instruction cannot use the dependency control hints. I went to reconfirm
and disabled the is_math() check in opt_set_dependency_control() and saw
that the disassembled math instructions with dependency hints had a
bogus math function. We were mistakenly overwriting it by setting an
empty conditional mod.
Unfortunately, this wasn't the cause of the aforementioned problem (I
reproduced it). This bug is benign, since we don't set dependeny hints
on math instructions -- but maybe some day.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_generator.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 4af9cbe83cb..06b0f347ae4 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -2010,7 +2010,8 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width) brw_inst *last = &p->store[last_insn_offset / 16]; - brw_inst_set_cond_modifier(brw, last, inst->conditional_mod); + if (inst->conditional_mod) + brw_inst_set_cond_modifier(brw, last, inst->conditional_mod); brw_inst_set_no_dd_clear(brw, last, inst->no_dd_clear); brw_inst_set_no_dd_check(brw, last, inst->no_dd_check); } |