[Mesa-dev] [PATCH v2 00/31] Nir support for Nouveau

Karol Herbst kherbst at redhat.com
Thu Jan 4 15:01:46 UTC 2018

significant changes to last series:
* support for geometry, tessellation and compute shaders
* support for more intrinsics and operations
* lot of fixes for 64 bit types
* NV50_PROG_USE_NIR=1 can be used to enable NIR for non debug builds

There are some outstanding issues triggered by having 64 bit loads and
nir_compact_varyings also does some harm. But I think the current state is
quite good and a lot of things will work out of the box already.

I mainly tested with piglit, unigine heaven and valley. RealisticRendering Demo
doesn't run yet, but this might be related to some 64bit or memory related

It would be nice if others could just run some games/tests with it and report
back where things are still broken, so that the focus can be on fixing real
issues instead of trying to pass all tests first.

./piglit run -x glx -x egl -x streaming-texture-leak -x max-texture-size tests/gpu.py:
[26073/26073] skip: 1640, pass: 20773, warn: 9, fail: 1548, crash: 2103

the biggest todos looking at the piglit results are:
* arb_gpu_shader5 interpolateat* (those nir ops don't map well to nvir)
  no good plan on how to properly implement those
* arb_gpu_shader5.texturegatheroffsets (nir internal assert)
  glsl_to_nir.cpp:2082: virtual void {anonymous}::nir_visitor::visit(ir_texture*): Assertion `ir->offset->type->is_vector() || ir->offset->type->is_scalar()' failed.
* some int64 stuff related to compound types
* various extensions
* variable-indexing (related to above mentioned packing issue)
* glsl-4.20.execution.vs_in
* some variable-indexing issues related to unaligned memory accesses
* some geometry shader fails

Karol Herbst (31):
  st/nir: treat tess shader input/outputs the same as geom shaders
  nvir: print the shader type when dumping headers
  nvir: move common converter code in base class
  nvir: add lowering helper
  nvc0: add support for NIR
  nvc0/debug: add env var to make nir default
  nvir/nir: run some passes to make the conversion easier
  nvir/nir: track defs and provide easy access functions
  nvir/nir: add nir type helper functions
  nvir/nir: use lowering helper
  nvir/nir: run assignSlots
  nvir/nir: parse NIR shader info
  nvir/nir: implement CFG handling
  nvir/nir: implement nir_load_const_instr
  nvir/nir: add skeleton for nir_intrinsic_instr
  nvir/nir: implement nir_alu_instr handling
  nvir/nir: implement nir_intrinsic_load_uniform
  nvir/nir: implement nir_intrinsic_store_(per_vertex_)output
  nvir/nir: implement nir_intrinsic_load_input
  nvir/nir: implement intrinsic_discard(_if)
  nvir/nir: implement loading system values
  nvir/nir: implement nir_ssa_undef_instr
  nvir/nir: implement nir_instr_type_tex
  nvir/nir: add getOperation for intrinsics
  nvir/nir: implement vote and ballot
  nvir/nir: implement variable indexing
  nvir/nir: implement geometry shader nir_intrinsics
  nvir/nir: implement nir_intrinsic_load_ubo
  nvir/nir: implement ssbo intrinsics
  nvir/nir: implement images
  nvir/nir: add memory barriers

 src/gallium/drivers/nouveau/Makefile.sources       |    5 +
 src/gallium/drivers/nouveau/codegen/nv50_ir.cpp    |    3 +
 src/gallium/drivers/nouveau/codegen/nv50_ir.h      |    1 +
 .../nouveau/codegen/nv50_ir_from_common.cpp        |  107 +
 .../drivers/nouveau/codegen/nv50_ir_from_common.h  |   58 +
 .../drivers/nouveau/codegen/nv50_ir_from_nir.cpp   | 2630 ++++++++++++++++++++
 .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp  |  106 +-
 .../nouveau/codegen/nv50_ir_lowering_helper.cpp    |  204 ++
 .../nouveau/codegen/nv50_ir_lowering_helper.h      |   50 +
 src/gallium/drivers/nouveau/meson.build            |   14 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_program.c    |   17 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c     |   50 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_state.c      |   27 +-
 src/mesa/state_tracker/st_glsl_to_nir.cpp          |    4 +-
 14 files changed, 3162 insertions(+), 114 deletions(-)
 create mode 100644 src/gallium/drivers/nouveau/codegen/nv50_ir_from_common.cpp
 create mode 100644 src/gallium/drivers/nouveau/codegen/nv50_ir_from_common.h
 create mode 100644 src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
 create mode 100644 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_helper.cpp
 create mode 100644 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_helper.h


More information about the mesa-dev mailing list