diff --git a/src/intel/compiler/brw_fs_builder.h b/src/intel/compiler/brw_fs_builder.h index 896088cc5b8..430c7d10fc1 100644 --- a/src/intel/compiler/brw_fs_builder.h +++ b/src/intel/compiler/brw_fs_builder.h @@ -344,7 +344,16 @@ namespace brw { emit(enum opcode opcode, const dst_reg &dst, const src_reg srcs[], unsigned n) const { - return emit(instruction(opcode, dispatch_width(), dst, srcs, n)); + /* Use the emit() methods for specific operand counts to ensure that + * opcode-specific operand fixups occur. + */ + if (n == 2) { + return emit(opcode, dst, srcs[0], srcs[1]); + } else if (n == 3) { + return emit(opcode, dst, srcs[0], srcs[1], srcs[2]); + } else { + return emit(instruction(opcode, dispatch_width(), dst, srcs, n)); + } } /**