Matt Turner <matts...@gmail.com> writes:

> On Tue, Jan 27, 2015 at 5:31 PM, Jason Ekstrand <ja...@jlekstrand.net> wrote:
>> +      emit(MUL(acc, op[0], op[1]));
>> +      emit(MACH(reg_null_d, op[0], op[1]));
>> +      emit(MOV(result, fs_reg(acc)));
>>        break;
>>     }
>>
>> @@ -773,72 +767,38 @@ fs_visitor::nir_emit_alu(nir_alu_instr *instr)
>>     case nir_op_ball_fequal3:
>>     case nir_op_ball_iequal3:
>>     case nir_op_ball_fequal4:
>> -   case nir_op_ball_iequal4: {
>> -      unsigned num_components = nir_op_infos[instr->op].input_sizes[0];
>> -      fs_reg temp = vgrf(num_components);
>> -      emit_percomp(CMP(temp, op[0], op[1], BRW_CONDITIONAL_Z),
>> -                   (1 << num_components) - 1);
>> -      emit_reduction(BRW_OPCODE_AND, result, temp, num_components);
>> -      break;
>> -   }
>> -
>> +   case nir_op_ball_iequal4:
>
> We can save it for later, but it might be interesting to let the fs
> backend get the vector comparisons directly, if that's possible.
>
> See https://bugs.freedesktop.org/show_bug.cgi?id=77456

I think you want to peephole it instead of relying on the language,
since you also want avoid the ANDs for non-vector conditions like "a < 0
&& b < 0".

(I've been thinking about this too)

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to