[Mesa-dev] [PATCH v10 00/20] Introducing SPIR-V support to clover

Pierre Moreau pierre.morrow at free.fr
Tue Jan 8 21:10:49 UTC 2019


Hello everyone,

The series is largely unchanged compared to the previous version, but it was
also rebased on the latest master. It would be nice to have the series merged
in for 19.0 (only three patches out of 20 are missing a review), if the series
is ready enough.

For recap since this series has been going on for a while and the last update
was some time ago, this series focuses on three areas:
* Updating the OpenCL headers and ICD table to OpenCL 2.2;
* Cleaning up and improving certain areas in clover, mostly in preparation for
  SPIR-V support;
* Accepting SPIR-V as an input (via the cl_khr_il_program extension for OpenCL
  <2.1, as well as via the OpenCL >=2.1 core support) and converting it to LLVM
  IR so that in can easily be used by drivers that already consume LLVM IR.

Missing reviews:
* Patch 13 (“clover/llvm: Allow translating from SPIR-V to LLVM”)
* Patch 15 (“clover/spirv: Add functions for validating SPIR-V binaries”)
* Patch 16 (“clover: Implement clCreateProgramWithILKHR”)

Changes since v9:
* Patch 15 (“clover/spirv: Add functions for validating SPIR-V binaries”):
  * Fix rebase conflicts against master;
  * Add `clover_cpp_std` to the overrides of the libcspirv target on Meson.
Changes since v8:
* Patch 3 (“clover/api: Fix tab indentation to spaces”) was dropped as another
  fix was merged in the mean time.

The whole series can be found at
https://gitlab.freedesktop.org/pmoreau/mesa/commits/clover_spirv_series_v10.

Thanks in advance,
Pierre


Karol Herbst (1):
  clover: update ICD table to support everything up to 2.2

Pierre Moreau (19):
  include/CL: Update to the latest OpenCL 2.2 headers
  clover: Remove the TGSI backend as unused
  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
  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/spirv: Add functions for validating SPIR-V binaries
  clover: Implement clCreateProgramWithILKHR
  clover: Handle CL_PROGRAM_IL in clGetProgramInfo
  clover/api: Implement CL_DEVICE_IL_VERSION
  clover: Advertise cl_khr_il_program
  clover: Implement clCreateProgramWithIL from OpenCL 2.1

 configure.ac                                  |  18 +
 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                                   |   8 +
 src/gallium/state_trackers/clover/Makefile.am |  30 +-
 .../state_trackers/clover/Makefile.sources    |   6 +-
 .../state_trackers/clover/api/device.cpp      |  18 +-
 .../state_trackers/clover/api/dispatch.cpp    |  29 +-
 .../state_trackers/clover/api/dispatch.hpp    | 194 +++++++
 .../state_trackers/clover/api/platform.cpp    |   6 +-
 .../state_trackers/clover/api/program.cpp     | 119 ++++-
 .../state_trackers/clover/core/device.cpp     |  32 +-
 .../state_trackers/clover/core/device.hpp     |   2 +
 .../state_trackers/clover/core/module.cpp     |   1 +
 .../state_trackers/clover/core/module.hpp     |  13 +-
 .../state_trackers/clover/core/platform.cpp   |   5 +
 .../state_trackers/clover/core/platform.hpp   |   2 +
 .../state_trackers/clover/core/program.cpp    |  55 +-
 .../state_trackers/clover/core/program.hpp    |  12 +
 .../clover/llvm/codegen/bitcode.cpp           |   3 +-
 .../clover/llvm/codegen/common.cpp            |   2 +-
 .../state_trackers/clover/llvm/invocation.cpp |  29 ++
 .../state_trackers/clover/llvm/invocation.hpp |   6 +
 src/gallium/state_trackers/clover/meson.build |  21 +-
 .../clover/spirv/invocation.cpp               | 138 +++++
 .../clover/{tgsi => spirv}/invocation.hpp     |  26 +-
 .../state_trackers/clover/tgsi/compiler.cpp   | 120 -----
 38 files changed, 2470 insertions(+), 399 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
 create mode 100644 src/gallium/state_trackers/clover/spirv/invocation.cpp
 rename src/gallium/state_trackers/clover/{tgsi => spirv}/invocation.hpp (56%)
 delete mode 100644 src/gallium/state_trackers/clover/tgsi/compiler.cpp

-- 
2.20.1



More information about the mesa-dev mailing list