summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_compact.c14
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;
}