microsoft: Add CLC frontend and kernel/compute support to DXIL converter
authorJesse Natalie <jenatali@microsoft.com>
Fri, 6 Nov 2020 16:09:30 +0000 (17:09 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Nov 2020 04:05:37 +0000 (04:05 +0000)
commitff05da7f8dc4aa531704d48f718514e3b1fff45d
tree42b328eaf716d1ac49d3af45beecfc6f27c62e9a
parent1885e356e6a4d425471c0bfa0aee5fcf98d19186
microsoft: Add CLC frontend and kernel/compute support to DXIL converter

This adds a standalone library which can convert through the pipeline of
OpenCL C -> SPIR -> SPIR-V -> NIR -> DXIL. It can add in the libclc
implementations of various library functions in the NIR phase, and
also massages the NIR to shift it more towards graphics-style compute.

This is leveraged by the out-of-tree OpenCLOn12 runtime
(https://github.com/microsoft/OpenCLOn12).

This is the combination of a lot of commits from our development branch,
containing code by several authors.

Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com>
Co-authored-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>
21 files changed:
meson.build
meson_options.txt
src/compiler/nir/nir_intrinsics.py
src/meson.build
src/microsoft/clc/clc_compiler.c [new file with mode: 0644]
src/microsoft/clc/clc_compiler.h [new file with mode: 0644]
src/microsoft/clc/clc_compiler_test.cpp [new file with mode: 0644]
src/microsoft/clc/clc_helpers.cpp [new file with mode: 0644]
src/microsoft/clc/clc_helpers.h [new file with mode: 0644]
src/microsoft/clc/clc_nir.c [new file with mode: 0644]
src/microsoft/clc/clc_nir.h [new file with mode: 0644]
src/microsoft/clc/clglon12compiler.def [new file with mode: 0644]
src/microsoft/clc/compute_test.cpp [new file with mode: 0644]
src/microsoft/clc/compute_test.h [new file with mode: 0644]
src/microsoft/clc/meson.build [new file with mode: 0644]
src/microsoft/compiler/dxcapi.h [new file with mode: 0644]
src/microsoft/compiler/dxil_nir.c
src/microsoft/compiler/dxil_nir.h
src/microsoft/compiler/nir_to_dxil.c
src/microsoft/compiler/nir_to_dxil.h
src/microsoft/meson.build