[Mesa-dev] [PATCH 00/29] NIR: more bit-size related patches

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Mar 21 12:05:39 UTC 2016


Hello,

The previous series [0], which is already in master, implemented the
minimum stuff to get sized types in NIR. This new batch starts the
implementation of proper fp64 support in NIR by fixing bit-size
calculations everywhere. It also adds support for doubles to
glsl_to_nir and adds required opcodes to handle conversions to/from
double and double pack/unpack operations.

This will be the foundation for the rest of fp64 work in NIR, which
will basically add a bunch of lowering passes to address common
hardware limitations  and that we will send that in a different series
after this.

We checked that these patches do not add any piglit regression. This
series is available in our Github repo [1], you can use the following
bash command to clone it:

$ git clone -b nir-bit-size-fixes https://github.com/Igalia/mesa.git

Thanks,

Sam

[0] https://lists.freedesktop.org/archives/mesa-dev/2016-March/109277.html
[1] https://github.com/Igalia/mesa/tree/nir-bit-size-fixes

Andres Gomez (1):
  nir/print: Adds support for printing double typed consts

Connor Abbott (15):
  nir/from_ssa: adapt to different bit sizes
  nir/locals_to_regs: adapt to different bit sizes
  nir/vars_to_ssa: adapt to different bit sizes
  nir/lower_vec: adapt to different bit sizes
  nir/glsl_to_nir: support doubles
  nir/print: print the bitsize of registers and SSA defs
  nir: add support for printing double immediates
  nir: handle doubles in nir_deref_get_const_initializer_load()
  nir/instr_set: handle 64-bit bit-sizes
  nir/split_var_copies: handle doubles
  nir: add support for d2f and f2d
  nir: add support for (un)pack_double_2x32
  nir: don't try to scalarize unpack_double_2x32
  nir: add split versions of (un)pack_double_2x32
  nir: add a pass for lowering (un)pack_double_2x32

Iago Toral Quiroga (12):
  nir/clone: clone bit_size in clone_load_const
  nir/lower_to_source_mods: Handle different bit sizes
  nir/lower_tex: fix get_zero_or_one() to use sized types
  nir/lower_tex: fix get_texture_size() to use sized types
  program/nir: include bit-size information
  nir/lower_load_const_to_scalar: suppport doubles and multiple bit
    sizes
  nir/glsl_to_nir: set the bit-size in the result of evaluate_rvalue
  nir: fix up bit sizes for undefined alu sources
  nir/glsl_to_nir: set bit_size on ssbo_load result
  nir: add d2i, d2u, d2b opcodes
  nir: add i2d and u2d opcodes
  nir/lower_to_source_mod: Skip unsafe operations

Samuel Iglesias Gonsálvez (1):
  nir: verify destination bit size when checking algebraic optimizations

 src/compiler/Makefile.sources                     |   1 +
 src/compiler/glsl/Makefile.sources                |   1 +
 src/compiler/nir/Makefile.sources                 |   1 +
 src/compiler/nir/glsl_to_nir.cpp                  |  91 ++++++++++++------
 src/compiler/nir/nir.c                            |   5 +
 src/compiler/nir/nir.h                            |   2 +
 src/compiler/nir/nir_algebraic.py                 |  11 ++-
 src/compiler/nir/nir_clone.c                      |   1 +
 src/compiler/nir/nir_from_ssa.c                   |   2 +
 src/compiler/nir/nir_instr_set.c                  |  22 ++++-
 src/compiler/nir/nir_lower_alu_to_scalar.c        |   3 +
 src/compiler/nir/nir_lower_double_packing.c       | 109 ++++++++++++++++++++++
 src/compiler/nir/nir_lower_load_const_to_scalar.c |   6 +-
 src/compiler/nir/nir_lower_locals_to_regs.c       |   1 +
 src/compiler/nir/nir_lower_tex.c                  |   5 +-
 src/compiler/nir/nir_lower_to_source_mods.c       |  27 +++++-
 src/compiler/nir/nir_lower_vars_to_ssa.c          |   3 +
 src/compiler/nir/nir_lower_vec_to_movs.c          |   1 +
 src/compiler/nir/nir_opcodes.py                   |  72 ++++++++++++++
 src/compiler/nir/nir_print.c                      |  17 +++-
 src/compiler/nir/nir_split_var_copies.c           |   2 +
 src/compiler/nir/nir_validate.c                   |  10 ++
 src/mesa/program/prog_to_nir.c                    |   2 +-
 23 files changed, 350 insertions(+), 45 deletions(-)
 create mode 100644 src/compiler/nir/nir_lower_double_packing.c

-- 
2.5.0



More information about the mesa-dev mailing list