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

Jason Ekstrand jason at jlekstrand.net
Fri Feb 24 01:14:30 UTC 2017


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



More information about the mesa-dev mailing list