[Mesa-dev] [PATCH 00/12] i965+nir: Do pack/unpack lowering in NIR

Matt Turner mattst88 at gmail.com
Tue Jan 26 11:14:36 PST 2016


On Tue, Jan 26, 2016 at 10:05 AM, Eric Anholt <eric at anholt.net> wrote:
> Matt Turner <mattst88 at gmail.com> writes:
>
>> This series adds NIR support for lowering pack/unpack opcodes and
>> switches i965 over to using that. The only place we still use the
>> GLSL IR lower_packing_builtins.cpp is for the half-precision functions
>> on Sandybridge.
>>
>> As a result, I get to remove the ir_unop_unpack_half_2x16_split_x/y opcodes
>> from GLSL IR, since i965 was the only consumer. A follow-on project I plan to
>> do is to remove these opcodes from NIR as well and just emit the appropriate
>> code directly in i965/fs, because again it's the only consumer.
>
> FWIW, I think I'll be interested in unpack_half_2x16_split_[xy] in the
> future.  I've got some more texture lowering stuff to be done before
> then, but it would happen some day.

Oh, in that case keeping them around is fine with me.

>> I add 6 new operations to NIR:
>>
>>    extract_ibyte - extract byte from dword and sign extend
>>    extract_ubyte - extract byte from dword and zero extend
>>    extract_iword - extract word from dword and sign extend
>>    extract_uword - extract word from dword and zero extend
>
> Could we call these extract_[iu](8|16)?  It always takes me a while to
> remember what "word" means -- worse than "short".

I'm okay with that.


More information about the mesa-dev mailing list