diff options
author | Kenneth Graunke <[email protected]> | 2014-06-30 07:51:51 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-08-10 19:32:34 -0700 |
commit | 0d6adce469b36190224cd13173441e98870c695a (patch) | |
tree | d355fd35d8645cbbb45f869b71ee9b9d61587b65 /src/mesa/drivers/dri | |
parent | 49519a1b63f41ddd5adc5ef4d98d384ecd26f283 (diff) |
i965/eu: Port Broadwell CMP destination type hack to brw_eu_emit.c.
See gen8_generator::CMP().
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 822c73cc439..1128bad29e5 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1742,6 +1742,14 @@ void brw_CMP(struct brw_compile *p, struct brw_context *brw = p->brw; brw_inst *insn = next_insn(p, BRW_OPCODE_CMP); + if (brw->gen >= 8) { + /* The CMP instruction appears to behave erratically for floating point + * sources unless the destination type is also float. Overriding it to + * match src0 makes it work in all cases. + */ + dest.type = src0.type; + } + brw_inst_set_cond_modifier(brw, insn, conditional); brw_set_dest(p, insn, dest); brw_set_src0(p, insn, src0); |