}
static inline bool
-is_3src(enum opcode opcode)
+is_3src(const struct brw_device_info *devinfo, enum opcode opcode)
{
return opcode_descs[opcode].nsrc == 3;
}
assert(brw_inst_cmpt_control(devinfo, src) == 0);
- if (is_3src(brw_inst_opcode(devinfo, src))) {
+ if (is_3src(devinfo, brw_inst_opcode(devinfo, src))) {
if (devinfo->gen >= 8) {
memset(&temp, 0, sizeof(temp));
if (brw_try_compact_3src_instruction(devinfo, &temp, src)) {
{
memset(dst, 0, sizeof(*dst));
- if (devinfo->gen >= 8 && is_3src(brw_compact_inst_3src_opcode(devinfo, src))) {
+ if (devinfo->gen >= 8 &&
+ is_3src(devinfo, brw_compact_inst_3src_opcode(devinfo, src))) {
brw_uncompact_3src_instruction(devinfo, dst, src);
return;
}
bool progress = false;
foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
- if (inst->is_3src() && inst->dst.is_null()) {
+ if (inst->is_3src(devinfo) && inst->dst.is_null()) {
inst->dst = fs_reg(VGRF, alloc.allocate(dispatch_width / 8),
inst->dst.type);
progress = true;
* This is applicable to 32b datatypes and 16b datatype. 64b datatypes
* cannot use the replicate control.
*/
- if (inst->is_3src()) {
+ if (inst->is_3src(devinfo)) {
if (type_sz(inst->src[arg].type) > 4)
return stride == 1;
else
}
bool
-backend_instruction::is_3src() const
+backend_instruction::is_3src(const struct brw_device_info *devinfo) const
{
- return ::is_3src(opcode);
+ return ::is_3src(devinfo, opcode);
}
bool
#ifdef __cplusplus
struct backend_instruction : public exec_node {
- bool is_3src() const;
+ bool is_3src(const struct brw_device_info *devinfo) const;
bool is_tex() const;
bool is_math() const;
bool is_control_flow() const;
src = reg;
}
- if (inst->is_3src()) {
+ if (inst->is_3src(devinfo)) {
/* 3-src instructions with scalar sources support arbitrary subnr,
* but don't actually use swizzles. Convert swizzle into subnr.
*/
unsigned composed_swizzle = brw_compose_swizzle(inst->src[arg].swizzle,
value.swizzle);
- if (inst->is_3src() &&
+ if (inst->is_3src(devinfo) &&
(value.file == UNIFORM ||
(value.file == ATTR && attributes_per_reg != 1)) &&
!brw_is_single_value_swizzle(composed_swizzle))