diff options
author | Matt Turner <[email protected]> | 2014-08-27 19:44:02 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-09-25 11:02:36 -0700 |
commit | 45c3ece266857c2f0d5cef50e95507ffb30694ba (patch) | |
tree | e80e5667126599bd28e50ab5fb345c791146520b /src/mesa/drivers | |
parent | 1fce6fcac18f2daacaacebff5f5249c2a4f8cc79 (diff) |
i965/compaction: Rework 3-src compaction logic.
It may be possible to create a contrived example in which a 3-src
instruction would have been compacted on Gen < 8. I'd rather not
discover it in the wild.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_compact.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 4f509dde135..8c30809f1d5 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -749,11 +749,15 @@ brw_try_compact_instruction(struct brw_context *brw, brw_compact_inst *dst, return false; } - if (brw->gen >= 8 && is_3src(brw_inst_opcode(brw, src))) { - memset(&temp, 0, sizeof(temp)); - if (brw_try_compact_3src_instruction(brw, &temp, src)) { - *dst = temp; - return true; + if (is_3src(brw_inst_opcode(brw, src))) { + if (brw->gen >= 8) { + memset(&temp, 0, sizeof(temp)); + if (brw_try_compact_3src_instruction(brw, &temp, src)) { + *dst = temp; + return true; + } else { + return false; + } } else { return false; } |