[Mesa-dev] [PATCH 0/5] nir/builder: Add control-flow helpers

Jason Ekstrand jason at jlekstrand.net
Wed Feb 15 22:59:13 UTC 2017


I was looking at Ian's int64 lowering code last night and was thinking
about what the lowering would look like in NIR.  The fact that it uses
loops and other control flow for handling division got me thinking about
doing control flow in nir_builder again.  So I spent a little time this
morning and hacked up this API.  All in all, I'm pretty happy with it.
Comments welcome.

Jason Ekstrand (5):
  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

 src/compiler/glsl/glsl_to_nir.cpp            | 38 +++++-----------
 src/compiler/nir/nir_builder.h               | 67 ++++++++++++++++++++++++++++
 src/compiler/nir/nir_lower_gs_intrinsics.c   |  9 ++--
 src/compiler/nir/nir_lower_indirect_derefs.c | 19 +++-----
 src/compiler/spirv/vtn_cfg.c                 | 45 ++++++-------------
 5 files changed, 102 insertions(+), 76 deletions(-)

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list