[Mesa-dev] [PATCH 0/6] nir: Rework conversion opcodes

Jason Ekstrand jason at jlekstrand.net
Wed Mar 8 22:51:25 UTC 2017


As I've been trolling through things such as fp64 and int64 lately, the
current status conversion opcodes in NIR began bothering me.  I've know
that it's sub-optimal for a while but I didn't realize just how hairy it
had gotten until this week.  This little series makes everything sane by
combining some conversions, renaming others, and making everything
reasonably self-consistent.  With this series in places, we should be
fairly ready for fp16, int16, and int8 types without piles of hand-written
conversion code.

This series builds on the earlier series to make component handling more
sane.  I don't think that series is required but I'm not actually sure
since I wrote this one on top of it.

Jason Ekstrand (6):
  nir/validate: Validate ALU bit-size rules
  nir: Add a get_nir_type_for_glsl_base_type helper
  glsl/nir: Use nir_type_conversion_op
  i965/vec4: Get rid of the type parameter from to/from_double
  i965/fs: Re-arrange comparison operations
  nir: Rework conversion opcodes

 src/amd/common/ac_nir_to_llvm.c                    | 24 +++---
 src/amd/vulkan/radv_meta_blit2d.c                  |  6 +-
 src/compiler/glsl/glsl_to_nir.cpp                  | 77 +++++++++---------
 src/compiler/nir/nir.c                             | 93 ---------------------
 src/compiler/nir/nir.h                             | 10 ++-
 src/compiler/nir/nir_builder.h                     |  4 +
 src/compiler/nir/nir_lower_double_ops.c            |  4 +-
 src/compiler/nir/nir_lower_idiv.c                  | 16 ++--
 src/compiler/nir/nir_lower_tex.c                   |  4 +-
 src/compiler/nir/nir_opcodes.py                    | 54 +++++--------
 src/compiler/nir/nir_opcodes_c.py                  | 66 +++++++++++++++
 src/compiler/nir/nir_opt_algebraic.py              | 40 ++++-----
 src/compiler/nir/nir_validate.c                    | 21 +++++
 src/gallium/auxiliary/nir/tgsi_to_nir.c            | 10 +--
 .../drivers/freedreno/ir3/ir3_compiler_nir.c       |  8 +-
 src/gallium/drivers/vc4/vc4_nir_lower_blend.c      |  2 +-
 src/gallium/drivers/vc4/vc4_nir_lower_io.c         | 16 ++--
 src/gallium/drivers/vc4/vc4_program.c              |  8 +-
 src/intel/blorp/blorp_blit.c                       | 18 ++---
 src/intel/vulkan/anv_nir_lower_input_attachments.c |  2 +-
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp           | 92 +++++++++------------
 .../dri/i965/brw_nir_attribute_workarounds.c       | 10 +--
 src/mesa/drivers/dri/i965/brw_vec4.h               |  6 +-
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp         | 94 +++++++++-------------
 src/mesa/program/prog_to_nir.c                     |  2 +-
 25 files changed, 317 insertions(+), 370 deletions(-)

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list