[Mesa-dev] [PATCH 03/14] i965/compaction: Rework 3-src compaction logic.
Matt Turner
mattst88 at gmail.com
Thu Aug 28 20:10:33 PDT 2014
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.
---
src/mesa/drivers/dri/i965/brw_eu_compact.c | 14 +++++++++-----
1 file 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 4f509dd..8c30809 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;
}
--
1.8.5.5
More information about the mesa-dev
mailing list