Plans are to get SPIR-V support for Nouveau with a cheap way. Before that I was looking into Pierres work on his direct SPIR-V to nvir pass and seemed much more complicated than doing NIR to nvir.
In the end we still plan to get Compute support through SPIR-V and my hope is to get that piped through NIR, so that a lot of other drivers could benefit from this as well. Stuff up to GLSL 1.30 should work (just 2 piglit fails up to that), some games run as well (truth is, I only checked one, but I expect that more will run). Usually I took the add-stuff-until-piglit-test-passes approach so a lot of details are still missing. But nevertheless I would like to get some feedback on the work and suggestions for improving this work. To use NIR just set NV50_PROG_USE_NIR=1 for a mesa DEBUG build. I plan to move it to a non debug variable for the next series. Features I want to work next on: * Geometry shaders * UBOs ./piglit run -x glx -x egl -x streaming-texture-leak -x max-texture-size tests/gpu.py: [26073/26073] skip: 1574, pass: 13451, warn: 9, fail: 5287, crash: 5752 Note: a lot of crashes are geometry/tesselation stuff hitting asserts. Karol Herbst (22): nvir: print the shader type when dumping headers nvir: move common converter code in base class 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: 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_output nvir/nir: implement nir_intrinsic_load_input nvir/nir: run assignSlots nvir/nir: parse NIR shader info 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: implement vote nvir/nir: implement variable indexing src/gallium/drivers/nouveau/Makefile.sources | 3 + 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 | 145 ++ .../drivers/nouveau/codegen/nv50_ir_from_common.h | 59 + .../drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 2009 ++++++++++++++++++++ .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 146 +- src/gallium/drivers/nouveau/meson.build | 12 +- src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 17 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 53 +- src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 24 +- 11 files changed, 2321 insertions(+), 151 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 -- 2.14.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev