[Mesa-dev] [PATCH v3 00/21] Introducing SPIR-V support to clover
Pierre Moreau
pierre.morrow at free.fr
Wed Feb 21 22:50:25 UTC 2018
Hello,
This updated series contains some additional fixes to clover, updates to the
OpenCL headers shipped with Mesa, the removal of the TGSI backend in clover (as
unused), the introduction of a new dependency, llvm-spirv, and some more
changes summarised further down.
llvm-spirv can be currently grabbed from
https://github.com/pierremoreau/llvm-spirv, on the branch integrate_with_mesa.
It seems this will be the current “master” repository, until it gets accepted
as an external tool in LLVM. As an out-of-tree LLVM consumer, it should be
relatively easy to package (especially compared to Khronos’ SPIRV_LLVM
repository).
The SPIR-V clover backend, that was previously part of this series, has been
dropped out for now, and will instead be submitted in a separate series along
with a consumer. So, what this series enable (besides fixing bugs), is to
accept SPIR-V binaries for drivers that accept LLVM (or NATIVE) as IR format,
so all drivers currently supported by clover.
The series is also accessible at https://github.com/pierremoreau/mesa, on the
branch clover_spirv_series_v3.
Thanks in advance for the reviews and comments,
Pierre
Changes since v2:
* Included an updated version of Karol Herbst’s patch
“clover: update ICD table to support everything up to 2.2”: new commit, patch
02;
* Renamed “clover: Add additional functions to query supported IRs” to
“clover: Add an helper for checking if an IR is supported”;
* Added a new commit (patch 05) modifying existing code to use the helper
introduced in the previous patch;
* Reworked the validation of devices when building programs: new commit, patch
06;
* Added a new commit (patch 12) removing the TGSI backend in clover, as unused;
* Added llvm-spirv as a dependency;
* Added a new commit (patch 14) for translating SPIR-V to LLVM IR;
* Dropped commit adding PIPE_IR_SPIRV (previously, patch 08);
* Dropped commit refusing to build from source if the preferred IR was
PIPE_IR_SPIRV (previously, patch 12);
* Dropped commit adding a pointer property (previously, patch 14);
* Dropped commit adding OpenCL 2.1 tokens related to SPIR-V, in favour of
updating all OpenCL headers to 2.2 (previously, patch 20, new patch 01);
* Dropped commits related to adding a SPIR-V backend to clover (previously,
patches 10, 11) as they will be submitted later on, along with an actual
SPIR-V consumer.
Unchanged patches:
* 03: “clover/api: Fix tab indentation to spaces”
* 07: “clover/api: Fail if trying to build a non-executable binary”
* 09: “clover: Track flags per module section”
* 10: “clover: Move device extensions definitions to core/device.cpp”
* 11: “clover: Move platform extensions definitions to clover/platform.cpp”
* 15: “include/CL: Add cl_khr_il_program”
* 21: “clover: Use OpenCL 2.1 defines in place of cl_khr_il_program”
Karol Herbst (1):
clover: update ICD table to support everything up to 2.2
Pierre Moreau (20):
include/CL: Update to the latest OpenCL 2.2 headers
clover/api: Fix tab indentation to spaces
clover: Add an helper for checking if an IR is supported
clover/device: Replace usage of "1 << PIPE_SHADER_IR_*" with
supports_ir
clover/api: Rework the validation of devices for building
clover/api: Fail if trying to build a non-executable binary
clover: Disallow creating libraries from other libraries
clover: Track flags per module section
clover: Move device extensions definitions to core/device.cpp
clover: Move platform extensions definitions to clover/platform.cpp
clover: Remove the TGSI backend as unused
configure.ac,meson: Check for SPIRV-Tools and llvm-spirv
clover/llvm: Allow translating from SPIR-V to LLVM IR
include/CL: Add cl_khr_il_program
clover: Implement clCreateProgramWithILKHR
clover: Handle CL_PROGRAM_IL_KHR in clGetProgramInfo
clover/api: Implement CL_DEVICE_IL_VERSION_KHR
clover: Advertise cl_khr_il_program
clover: Implement clCreateProgramWithIL from OpenCL 2.1
clover: Use OpenCL 2.1 defines in place of cl_khr_il_program
configure.ac | 10 +
include/CL/cl.h | 472 ++++++++++++++++-----
include/CL/cl_d3d10.h | 7 +-
include/CL/cl_d3d11.h | 7 +-
include/CL/cl_dx9_media_sharing.h | 9 +-
include/CL/cl_dx9_media_sharing_intel.h | 182 ++++++++
include/CL/cl_egl.h | 9 +-
include/CL/cl_ext.h | 338 ++++++++++++++-
include/CL/cl_ext_intel.h | 429 +++++++++++++++++++
include/CL/cl_gl.h | 7 +-
include/CL/cl_gl_ext.h | 7 +-
include/CL/cl_platform.h | 328 ++++++++++----
include/CL/cl_va_api_media_sharing_intel.h | 172 ++++++++
include/CL/opencl.h | 7 +-
meson.build | 4 +
src/gallium/state_trackers/clover/Makefile.am | 17 +-
src/gallium/state_trackers/clover/Makefile.sources | 4 -
src/gallium/state_trackers/clover/api/device.cpp | 19 +-
src/gallium/state_trackers/clover/api/dispatch.cpp | 29 +-
src/gallium/state_trackers/clover/api/dispatch.hpp | 194 +++++++++
src/gallium/state_trackers/clover/api/platform.cpp | 6 +-
src/gallium/state_trackers/clover/api/program.cpp | 161 ++++++-
src/gallium/state_trackers/clover/core/device.cpp | 28 +-
src/gallium/state_trackers/clover/core/device.hpp | 2 +
src/gallium/state_trackers/clover/core/module.cpp | 1 +
src/gallium/state_trackers/clover/core/module.hpp | 13 +-
.../state_trackers/clover/core/platform.cpp | 5 +
.../state_trackers/clover/core/platform.hpp | 2 +
src/gallium/state_trackers/clover/core/program.cpp | 56 ++-
src/gallium/state_trackers/clover/core/program.hpp | 12 +
.../state_trackers/clover/llvm/codegen/bitcode.cpp | 3 +-
.../state_trackers/clover/llvm/codegen/common.cpp | 2 +-
.../state_trackers/clover/llvm/invocation.cpp | 26 ++
.../state_trackers/clover/llvm/invocation.hpp | 4 +
src/gallium/state_trackers/clover/meson.build | 12 +-
.../state_trackers/clover/tgsi/compiler.cpp | 120 ------
.../state_trackers/clover/tgsi/invocation.hpp | 37 --
37 files changed, 2304 insertions(+), 437 deletions(-)
create mode 100644 include/CL/cl_dx9_media_sharing_intel.h
create mode 100644 include/CL/cl_ext_intel.h
create mode 100644 include/CL/cl_va_api_media_sharing_intel.h
delete mode 100644 src/gallium/state_trackers/clover/tgsi/compiler.cpp
delete mode 100644 src/gallium/state_trackers/clover/tgsi/invocation.hpp
--
2.16.2
More information about the mesa-dev
mailing list