Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
fixed_hw_reg.nr == BRW_ARF_ACCUMULATOR;
}
+bool
+backend_instruction::is_3src() const
+{
+ return opcode < ARRAY_SIZE(opcode_descs) && opcode_descs[opcode].nsrc == 3;
+}
+
bool
backend_instruction::is_tex() const
{
#ifdef __cplusplus
struct backend_instruction : public exec_node {
+ bool is_3src() const;
bool is_tex() const;
bool is_math() const;
bool is_control_flow() const;
inst->opcode == SHADER_OPCODE_GEN4_SCRATCH_WRITE)
return false;
- bool is_3src_inst = (inst->opcode == BRW_OPCODE_LRP ||
- inst->opcode == BRW_OPCODE_MAD ||
- inst->opcode == BRW_OPCODE_BFE ||
- inst->opcode == BRW_OPCODE_BFI2);
- if (is_3src_inst && value.file == UNIFORM)
+ if (inst->is_3src() && value.file == UNIFORM)
return false;
if (inst->is_send_from_grf())