[Mesa-dev] [PATCH 0/8] anv: Add int64 support for gen8+

Jason Ekstrand jason at jlekstrand.net
Fri Feb 24 20:53:05 UTC 2017


On Thu, Feb 23, 2017 at 11:08 PM, Michael Schellenberger Costa <
mschellenbergercosta at googlemail.com> wrote:

> Hi Jason,
>
> how much of a noob task would the expansion to other operations be?
>

It shouldn't be too bad.  Last night, I cracked out a bunch more lowering
helpers.  I haven't tested them yet but they should be roughly what we need:

https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/nir-int64

I think all that's left after that is shifts, bcsel, and conversions (int
<-> float etc.).  It should be fairly easy to write.  Debugging will
require learning a bit about the compiler stack but this is as good a
learning opportunity as any.

--Jason


> --Michael
>
> -----Ursprüngliche Nachricht-----
> Von: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] Im Auftrag
> von Jason Ekstrand
> Gesendet: Freitag, 24. Februar 2017 02:15
> An: mesa-dev at lists.freedesktop.org
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> Betreff: [Mesa-dev] [PATCH 0/8] anv: Add int64 support for gen8+
>
> This little series adds int64 support to Vulkan on Broadwell and newer
> hardware.  In theory, we could also support it on gen7 but that requires
> more lowering code to be written.
>
> Most of this series is the nir_builder control-flow stuff that I sent out
> earlier with a small addition to make it easy to add phi instructions after
> an if statement.  Next comes an int64 lowering pass in NIR that mirrors the
> GLSL IR pass written by Ian.
>
> The second-to-last patch makes i965 use the new NIR pass rather than the
> GLSL IR one.  There are two reasons for this.  First, is that GL gets
> better int64 test coverage than Vulkan does at the moment.  Second, this
> means that we get at least one run of the NIR optimization loop (including
> nir_opt_algebraic) before we do 64-bit integer lowering and we may be able
> to get rid of some instructions instead of having to lower them.
>
> Finally, it turns it in in the Vulkan driver for gen8+.  Once the lowering
> pass gets expanded to handle the rest of the integer operations (maybe a
> good noob task?), we can turn it on for gen7.
>
> Jason Ekstrand (8):
>   nir/builder: Add support for easily building control-flow
>   glsl/nir: Use nir_builder's new control-flow helpers
>   nir/lower_gs_intrinsics: Use nir_builder control-flow helpers
>   nir/lower_indirect: Use nir_builder control-flow helpers
>   spirv: Use nir_builder for control flow
>   nir: Add a simple int64 lowering pass
>   i965: Do int64 lowering in NIR
>   anv: Advertise shaderInt64 on Broadwell and above
>
>  src/compiler/Makefile.sources                |   1 +
>  src/compiler/glsl/glsl_to_nir.cpp            |  38 ++--
>  src/compiler/nir/nir.h                       |  11 ++
>  src/compiler/nir/nir_builder.h               |  95 +++++++++
>  src/compiler/nir/nir_lower_gs_intrinsics.c   |   9 +-
>  src/compiler/nir/nir_lower_indirect_derefs.c |  35 +---
>  src/compiler/nir/nir_lower_int64.c           | 275
> +++++++++++++++++++++++++++
>  src/compiler/spirv/vtn_cfg.c                 |  45 ++---
>  src/intel/vulkan/anv_device.c                |   2 +-
>  src/mesa/drivers/dri/i965/brw_link.cpp       |   5 -
>  src/mesa/drivers/dri/i965/brw_nir.c          |   7 +
>  11 files changed, 423 insertions(+), 100 deletions(-)  create mode 100644
> src/compiler/nir/nir_lower_int64.c
>
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170224/5196420a/attachment-0001.html>


More information about the mesa-dev mailing list