[Mesa-dev] [PATCH 00/12] i965+nir: Do pack/unpack lowering in NIR
Iago Toral
itoral at igalia.com
Thu Jan 28 23:54:19 PST 2016
Hi Matt,
With the small changes agreed with Jason for patches 9 and 10 you can
add my Rb to those two patches as well. I think with that the entire
series is reviewed.
I also left a comment in patch 9 about using f2u instead f2i since it
looks like that would be more correct by the spec, but it is probably
unnecessary in practice so do with that as you will.
Iago
On Tue, 2016-01-26 at 16:33 +0100, Iago Toral wrote:
> Patches 1 to 4 are,
>
> Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
>
> I intend to review the remaining patches tomorrow as well if nobody else
> beats me to it.
>
> Iago
>
> On Mon, 2016-01-25 at 15:18 -0800, Matt Turner wrote:
> > 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.
> >
> > 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
> > pack_uvec4_to_uint - packs the low 8-bits of src0.xyzw into a uint
> > pack_uvec2_to_uint - packs the low 16-bits of src0.xy into a uint
> >
> > The last two opcodes are used in lowering the pack operations. They're mostly
> > useful because nir_opt_algebraic isn't capable of handling swizzles. I look
> > forward to getting rid of them.
> >
> > I sent an RFC patch in December [1] that optimized some Unigine shaders with
> > extract_byte. Eric asked whether we should add new opcodes (extract_*) or use
> > bitfield_extract and recognize special cases in the driver backends. I've opted
> > to add new operations because of the simplicity of recognition with
> > nir_opt_algebraic.
> >
> > I'm planning to rebase that optimization on this series and send it separately.
> >
> > [1] http://lists.freedesktop.org/archives/mesa-dev/2015-December/102264.html
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list