[Mesa-dev] [PATCH 0/6] i965: Do textures swizzle work-arounds in NIR.

Jason Ekstrand jason at jlekstrand.net
Sat Nov 14 20:27:45 PST 2015


On Nov 14, 2015 6:40 PM, "Connor Abbott" <cwabbott0 at gmail.com> wrote:
>
> Series is
>
> Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

Thanks!  I'll make sure to have ken or matt take a quick look at the last
one.

Now, if only someone would review the nir_shader_clone patch...

> Although I'm not as familiar now with the code touched in the last patch.
>
> On Thu, Nov 12, 2015 at 3:13 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> > The subject says it all.  This little series adds texture swizzle
support
> > to nir_lower_tex and makes the i965 driver use that instead of its own
> > code.  This approach has a few advantages:
> >
> >  1) It lets us share the swizzling code between both backends and with
> >     anyone else who wants it.
> >
> >  2) It simplifies the work-arounds we have to do for RG32F textures
because
> >     everything is pre-swizzled by the time the backend sees it.
> >
> >  3) If someone wants to come along and implement texture write-masking
in
> >     the FS backend, they'll have an easier time of it.  One of my
> >     approaches to doing so was substantially complicated by the fact
that,
> >     thanks to the swizzle, the channels used that we can see from NIR
don't
> >     apply to the actual texturing instruction.  Now that the swizzling
is
> >     done in NIR, this should be substantially simpler.
> >
> > Jason Ekstrand (6):
> >   nir/validate: Validated dests after sources
> >   nir: Use instr/if_rewrite in nir_ssa_def_rewrite_uses
> >   nir: Add a ssa_def_rewrite_uses_after helper
> >   nir: Add a tex_instr_is_query helper
> >   nir/lower_tex: Add support for lowering texture swizzle
> >   i965: Use NIR for lowering texture swizzle
> >
> >  src/glsl/nir/nir.c                             |  63 ++++++++++++---
> >  src/glsl/nir/nir.h                             |  40 ++++++++++
> >  src/glsl/nir/nir_lower_tex.c                   |  67 ++++++++++++++++
> >  src/glsl/nir/nir_validate.c                    |  18 ++---
> >  src/mesa/drivers/dri/i965/brw_fs.h             |   4 -
> >  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp   | 105
++++---------------------
> >  src/mesa/drivers/dri/i965/brw_nir.c            |  14 +++-
> >  src/mesa/drivers/dri/i965/brw_vec4.h           |   4 -
> >  src/mesa/drivers/dri/i965/brw_vec4_nir.cpp     |  24 +++---
> >  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |  93
++--------------------
> >  10 files changed, 215 insertions(+), 217 deletions(-)
> >
> > --
> > 2.5.0.400.gff86faf
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151114/830dce74/attachment-0001.html>


More information about the mesa-dev mailing list