[Mesa-dev] [PATCH 00/15] Clover: support CL through SPIR-V
Karol Herbst
kherbst at redhat.com
Sat May 11 14:06:57 UTC 2019
MR on gitlab: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/563
Due to some nouveau and other random bits I thought it makes sense to post
this series on the Mailing List as well.
In short, this series adds support for providing OpenCL through spirv by
using the spirv-llvm-translator library to convert llvm to spirv.
Karol Herbst (10):
nv50/ir/nir: parse system values first and stop for compute shaders
nv50/ir/nir: don't assert on !main
nv50/ir/nir: handle kernel inputs
nv50/ir/nir: implement load/store_global
gallium: add blob field to pipe_llvm_program_header
rename pipe_llvm_program_header to pipe_binary_program_header
nir/spirv: add spirv_to_nir_cl
gallium: add entry_point field to pipe_compute_state
clover: add support for consuming spirv
nvc0: expose spirv support
Pierre Moreau (5):
meson: Check for SPIRV-Tools and llvm-spirv
clover/spirv: Add functions for validating SPIR-V binaries
clover/spirv: Add functions for parsing arguments, linking programs,
etc.
clover/llvm: Add options for dumping SPIR-V binaries
clover/llvm: Add functions for compiling from source to SPIR-V
meson.build | 13 +
meson_options.txt | 6 +
src/compiler/Makefile.sources | 1 +
src/compiler/nir/meson.build | 1 +
src/compiler/spirv/nir_spirv.h | 4 +
src/compiler/spirv/spirv_to_nir_cl.c | 124 +++
.../nouveau/codegen/nv50_ir_from_nir.cpp | 120 ++-
src/gallium/drivers/nouveau/nouveau_screen.c | 1 +
src/gallium/drivers/nouveau/nouveau_screen.h | 1 +
.../drivers/nouveau/nvc0/nvc0_screen.c | 14 +-
.../drivers/nouveau/nvc0/nvc0_screen.h | 2 +
src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 10 +
src/gallium/drivers/r600/evergreen_compute.c | 6 +-
src/gallium/drivers/radeonsi/si_compute.c | 6 +-
src/gallium/include/pipe/p_defines.h | 1 +
src/gallium/include/pipe/p_state.h | 4 +-
.../state_trackers/clover/Makefile.sources | 4 +
.../state_trackers/clover/core/compiler.hpp | 68 ++
.../state_trackers/clover/core/device.cpp | 21 +-
.../state_trackers/clover/core/kernel.cpp | 1 +
.../state_trackers/clover/core/program.cpp | 10 +-
.../clover/llvm/codegen/common.cpp | 2 +-
.../state_trackers/clover/llvm/invocation.cpp | 100 ++-
.../state_trackers/clover/llvm/invocation.hpp | 8 +
.../state_trackers/clover/llvm/util.hpp | 4 +-
src/gallium/state_trackers/clover/meson.build | 23 +-
.../clover/spirv/invocation.cpp | 756 ++++++++++++++++++
.../clover/spirv/invocation.hpp | 63 ++
28 files changed, 1291 insertions(+), 83 deletions(-)
create mode 100644 src/compiler/spirv/spirv_to_nir_cl.c
create mode 100644 src/gallium/state_trackers/clover/core/compiler.hpp
create mode 100644 src/gallium/state_trackers/clover/spirv/invocation.cpp
create mode 100644 src/gallium/state_trackers/clover/spirv/invocation.hpp
--
2.21.0
More information about the mesa-dev
mailing list