[Mesa-dev] [PATCH v2 7/7] i965/nir: Use signed integer type for booleans

Matt Turner mattst88 at gmail.com
Fri Mar 20 13:56:02 PDT 2015


On Fri, Mar 20, 2015 at 1:37 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On Fri, Mar 20, 2015 at 1:12 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> On Fri, Mar 20, 2015 at 11:24 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
>>> -      emit(MOV(result, masked));
>>> +      emit(MOV(retype(result, BRW_REGISTER_TYPE_D), masked));
>>
>> This hunk isn't necessary. masked is vgrf(glsl_type::int_type).
>
> This hunk retypes result, not masked.

Oh, yeah. But result is set at the top of the function like this:

   fs_reg result = get_nir_dest(instr->dest.dest);
   result.type = brw_type_for_nir_type(nir_op_infos[instr->op].output_type);

Isn't that sufficient? We're only going to be resolving things that
were bool-typed to begin with, which should mean that the other
changes in this patch handled it.


More information about the mesa-dev mailing list