intel/compiler: Fixup operands in fs_builder::emit() that takes array
The versions that take a specific number of operands will do various fixups depending on the platform and the opcode. However, the version that takes an array of sources did not. This makes all version operate similarly. Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user