[Mesa-dev] [PATCH v2 04/22] clover: Disallow creating libraries from other libraries

2018-01-22 Thread Pierre Moreau
If creating a library, do not allow non-compiled object in it, as executables are not allowed, and libraries would make it really hard to enforce the "-enable-link-options" flag. Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/

[Mesa-dev] [PATCH v2 03/22] clover/api: Fail if trying to build a non-executable binary

2018-01-22 Thread Pierre Moreau
From the OpenCL 1.2 Specification, Section 5.6.2 (about clBuildProgram: > If program is created with clCreateProgramWithBinary, then the > program binary must be an executable binary (not a compiled binary or > library). Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> -

Re: [Mesa-dev] [PATCH v2 15/22] include/CL: Add cl_khr_il_program

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:08, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > Same comment as Karol, let's update the header instead. I will do that. Though that won’t impact th

Re: [Mesa-dev] [PATCH v2 04/22] clover: Disallow creating libraries from other libraries

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:04, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > If creating a library, do not allow non-compiled object in it, as > > executables are not allowed, and libraries would make it really hard to > > enforce t

Re: [Mesa-dev] [PATCH v2 03/22] clover/api: Fail if trying to build a non-executable binary

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:03, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > From the OpenCL 1.2 Specification, Section 5.6.2 (about clBuildProgram: > > > >> If program is created with clCreateProgramWithBinary, then the > >> p

Re: [Mesa-dev] [PATCH v2 02/22] clover: Add additional functions to query supported IRs

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:03, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > --- > > src/gallium/state_trackers/clover/core/device.cpp | 11 +++ > > src/gallium/

Re: [Mesa-dev] [PATCH v2 10/22] clover/spirv: Import spirv.hpp11 version 1.0 (rev 12)

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:06, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > --- > > .../state_trackers/clover/spirv/spirv.hpp11| 997 > > +++

Re: [Mesa-dev] [PATCH v2 04/22] clover: Disallow creating libraries from other libraries

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 15:16, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > On 2018-01-23 — 14:04, Francisco Jerez wrote: > >> Pierre Moreau <pierre.mor...@free.fr> writes: > >> > >> > If creating a library, do not

Re: [Mesa-dev] [PATCH v2 09/22] configure.ac, meson: Check for SPIRV-Tools

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:20, Jan Vesely wrote: > On Tue, 2018-01-23 at 01:33 +0100, Pierre Moreau wrote: > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > do these tools handle the original SPIR format as well? can this be > used to support cl_khr_spir? > >

Re: [Mesa-dev] [PATCH v2 08/22] include/pipe: Define SPIRV as an IR

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:07, Jan Vesely wrote: > On Tue, 2018-01-23 at 01:33 +0100, Pierre Moreau wrote: > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > --- > > src/gallium/include/pipe/p_defines.h | 1 + > > 1 file changed, 1 insertion(+) > > &g

Re: [Mesa-dev] [PATCH v2 08/22] include/pipe: Define SPIRV as an IR

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 13:33, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > On 2018-01-23 — 14:07, Jan Vesely wrote: > >> On Tue, 2018-01-23 at 01:33 +0100, Pierre Moreau wrote: > >> > Signed-off-by: Pierre Moreau <pierre.mor.

Re: [Mesa-dev] [PATCH v2 13/22] clover: Handle the case when linking SPIR-V binaries together

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:08, Francisco Jerez wrote: > Pierre Moreau <pierre.mor...@free.fr> writes: > > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > --- > > src/gallium/state_trackers/clover/core/program.cpp | 22 > > +

Re: [Mesa-dev] [PATCH v2 00/22] Introducing SPIR-V support to clover

2018-01-23 Thread Pierre Moreau
On 2018-01-23 — 14:02, Francisco Jerez wrote: > Karol Herbst <kher...@redhat.com> writes: > > > there seem to be some patches missing? > > > > On Tue, Jan 23, 2018 at 1:33 AM, Pierre Moreau <pierre.mor...@free.fr> > > wrote: > >> Hello, > &

[Mesa-dev] [PATCH v4 08/20] clover/api: Fail if trying to build a non-executable binary

2018-03-07 Thread Pierre Moreau
From the OpenCL 1.2 Specification, Section 5.6.2 (about clBuildProgram): > If program is created with clCreateProgramWithBinary, then the > program binary must be an executable binary (not a compiled binary or > library). Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by

[Mesa-dev] [PATCH v4 10/20] clover: Track flags per module section

2018-03-07 Thread Pierre Moreau
ed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: drop the modification to the tgsi backend, as already dropped (Aaron Watry) src/gallium/state_trackers/clover/core/module.cpp | 1 + src/gallium/state_trackers/clover/core/module.hpp

[Mesa-dev] [PATCH v4 07/20] clover/api: Rework the validation of devices for building

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: * validate_build_common no longer returns a list of devices (Francisco Jerez); * Dropped duplicate checks (Francisco Jerez). src/gallium/state_trackers/clover/api/program.cpp

[Mesa-dev] [PATCH v4 06/20] clover/device: Replace usage of "1 << PIPE_SHADER_IR_*" with supports_ir

2018-03-07 Thread Pierre Moreau
Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/core/device.cpp | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/clover/core/device.cpp b

[Mesa-dev] [PATCH v4 09/20] clover: Disallow creating libraries from other libraries

2018-03-07 Thread Pierre Moreau
If creating a library, do not allow non-compiled object in it, as executables are not allowed, and libraries would make it really hard to enforce the "-enable-link-options" flag. Reviewed-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Aaron Watry <awa...@gmail.com>

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

2018-03-07 Thread Pierre Moreau
lover: Implement clCreateProgramWithIL from OpenCL 2.1” 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/api: Fix tab indentation to spaces clover: Remove the TGSI backend as unused clove

[Mesa-dev] [PATCH v4 03/20] clover/api: Fix tab indentation to spaces

2018-03-07 Thread Pierre Moreau
Acked-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Karol Herbst <kher...@redhat.com> Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/device.cpp | 2 +- 1 file changed, 1

[Mesa-dev] [PATCH v4 02/20] clover: update ICD table to support everything up to 2.2

2018-03-07 Thread Pierre Moreau
From: Karol Herbst <kher...@redhat.com> v2: add more prototypes Signed-off-by: Karol Herbst <kher...@redhat.com> Reviewed-by: Aaron Watry <awa...@gmail.com> Reviewed-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/dispatch.cpp

[Mesa-dev] [PATCH v4 11/20] clover: Move device extensions definitions to core/device.cpp

2018-03-07 Thread Pierre Moreau
Reviewed-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/device.cpp | 11 +-- src/gallium/state_trackers/clover/core/device.cpp | 14 +

[Mesa-dev] [PATCH v4 04/20] clover: Remove the TGSI backend as unused

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/Makefile.am | 11 +- src/gallium/state_trackers/clover/Makefile.sources | 4 - src/gallium/state_trackers/clover/core/program.cpp | 13 +-- src/gallium/state_trackers/clover/meson.build

[Mesa-dev] [PATCH v4 05/20] clover: Add an helper for checking if an IR is supported

2018-03-07 Thread Pierre Moreau
Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: v3: * Dropped supported_irs() (Francisco Jerez) * Changed supports_ir() argument type to `enum pipe_shader_ir` (Francisco Jerez) src/gallium/state_trackers

[Mesa-dev] [PATCH v4 20/20] clover: Implement clCreateProgramWithIL from OpenCL 2.1

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: v3: Remove the const from the length argument of clCreateProgramWithIL src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +- src/gallium/state_trackers/clover/api/program.cpp | 8 2 files changed, 9 inse

[Mesa-dev] [PATCH v4 15/20] include/CL: Add cl_khr_il_program

2018-03-07 Thread Pierre Moreau
Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- include/CL/cl_ext.h | 37 + 1 file changed, 37 insertions(+) diff --git a/include/CL/cl_ext.h b/include/CL/cl_ext.h index 5078e8f45f..5ea49

[Mesa-dev] [PATCH v4 16/20] clover: Implement clCreateProgramWithILKHR

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: guard parts of the code behind SPIR-V support v3: * Remove the const on the length argument to CreateProgramWithILKHR (Francisco Jerez); * Capitalize comment (Francisco Jerez); *

[Mesa-dev] [PATCH v4 13/20] configure.ac, meson: Check for SPIRV-Tools and llvm-spirv

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: * make SPIRV-Tools and llvm-spirv optional (Francisco Jerez); * bump requirement for llvm-spirv to version 0.2 v3: * Bump the required version of SPIRV-Tools to the latest release;

[Mesa-dev] [PATCH v4 14/20] clover/llvm: Allow translating from SPIR-V to LLVM IR

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: * guard the SPIR-V code; * use an istringstream instead of a bidirectional stringstream, and initialise it directly (Francisco Jerez). .../state_trackers/clover/llvm/invocation.cpp

[Mesa-dev] [PATCH v4 18/20] clover/api: Implement CL_DEVICE_IL_VERSION

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: Use the core define instead of the extension one (Karol Herbst) v3: Throw an exception if the cl_khr_il_program extension is not supported (Francisco Jerez) src/gallium/state_trackers/clov

[Mesa-dev] [PATCH v4 19/20] clover: Advertise cl_khr_il_program

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: do not advertise SPIR-V support if CLOVER_ALLOW_SPIRV is not defined v3: Advertise cl_khr_il_program if if the device support NATIVE as IR src/gallium/state_trackers/clover/api/platform.cpp | 2 +

[Mesa-dev] [PATCH v4 12/20] clover: Move platform extensions definitions to clover/platform.cpp

2018-03-07 Thread Pierre Moreau
Reviewed-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/platform.cpp | 4 ++-- src/gallium/state_trackers/clover/core/platform.cpp | 5

[Mesa-dev] [PATCH v4 17/20] clover: Handle CL_PROGRAM_IL in clGetProgramInfo

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Notes: Changes in v4: Use the core define instead of the extension one (Karol Herbst) v3: Switch from using a pointer attribute to a vector (Francisco Jerez) src/gallium/state_trackers/clover/api/program.cpp | 7 +++

Re: [Mesa-dev] [PATCH v5 08/34] nvir/nir: run some passes to make the conversion easier

2018-03-11 Thread Pierre Moreau
On 2018-02-20 — 22:02, Karol Herbst wrote: > v2: add constant_folding > > Signed-off-by: Karol Herbst > --- > .../drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 40 > ++ > 1 file changed, 40 insertions(+) > > diff --git

Re: [Mesa-dev] [PATCH v5 10/34] nvir/nir: add nir type helper functions

2018-03-11 Thread Pierre Moreau
On 2018-02-20 — 22:02, Karol Herbst wrote: > v4: treat imul as unsigned > v5: remove pointless !! > > Signed-off-by: Karol Herbst > --- > .../drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 117 > + > 1 file changed, 117 insertions(+) > > diff --git

Re: [Mesa-dev] [PATCH 4/5 v6] clover/llvm: Add get_[cl|language]_version, validation and some helpers

2018-03-13 Thread Pierre Moreau
Sorry, partially forgot about it. I’ll look at it over the weekend, as I don’t have time before. :-/ Pierre signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [REBASED PATCH v5 09/21] clover: Disallow creating libraries from other libraries

2018-03-27 Thread Pierre Moreau
If creating a library, do not allow non-compiled object in it, as executables are not allowed, and libraries would make it really hard to enforce the "-enable-link-options" flag. Reviewed-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Aaron Watry <awa...@gmail.com>

[Mesa-dev] [PATCH v6 14/21] clover/llvm: Allow translating from SPIR-V to LLVM IR

2018-03-27 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- v6: Update Makefile.am to add to libclllvm its new llvm-spirv dependency. (Karol Herbst) src/gallium/state_trackers/clover/Makefile.am | 6 - .../state_trackers/clover/llvm/invocation.cpp

[Mesa-dev] [REBASED PATCH v5 16/21] clover/spirv: Add functions for validating SPIR-V binaries

2018-03-27 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- This patch was not modified, but no longer applied cleanly after modifying “clover/llvm: Allow translating from SPIR-V to LLVM IR” in the v6. src/gallium/state_trackers/clover/Makefile.am | 15 ++- src/gallium/state_trackers/

[Mesa-dev] [PATCH v6 07/21] clover/api: Rework the validation of devices for building

2018-03-27 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- v6: * Drop the `valid_devs` argument to `validate_build_common()` (Francisco Jerez) * Change `clLinkProgram()` to initialise `prog`’s devices prior to calling `validate_build_common()`. src/gallium/state_trackers/clover/api/progr

[Mesa-dev] [PATCH v5 02/21] clover: update ICD table to support everything up to 2.2

2018-03-25 Thread Pierre Moreau
From: Karol Herbst <kher...@redhat.com> Reviewed-by: Pierre Moreau <pierre.mor...@free.fr> Signed-off-by: Karol Herbst <kher...@redhat.com> --- v5: Fix return type of clCreateCommandQueueWithProperties v2: add more prototypes src/gallium/state_trackers/clover/api/dispatch.c

[Mesa-dev] [PATCH v5 04/21] clover: Remove the TGSI backend as unused

2018-03-25 Thread Pierre Moreau
Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/Makefile.am | 11 +- src/gallium/state_trackers/clover/Makefile.sources | 4 - src/gallium/state_trackers/clover/core/program.cpp |

[Mesa-dev] [PATCH v5 11/21] clover: Move device extensions definitions to core/device.cpp

2018-03-25 Thread Pierre Moreau
Reviewed-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/device.cpp | 11 +-- src/gallium/state_trackers/clover/core/device.cpp | 14 +

[Mesa-dev] [PATCH v5 14/21] clover/llvm: Allow translating from SPIR-V to LLVM IR

2018-03-25 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- .../state_trackers/clover/llvm/invocation.cpp | 29 ++ .../state_trackers/clover/llvm/invocation.hpp | 6 + src/gallium/state_trackers/clover/meson.build | 2 +- 3 files changed, 36 insertions

[Mesa-dev] [PATCH v5 12/21] clover: Move platform extensions definitions to clover/platform.cpp

2018-03-25 Thread Pierre Moreau
Reviewed-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/platform.cpp | 4 ++-- src/gallium/state_trackers/clover/core/platform.cpp | 5

[Mesa-dev] [PATCH v5 10/21] clover: Track flags per module section

2018-03-25 Thread Pierre Moreau
ed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/core/module.cpp | 1 + src/gallium/state_trackers/clover/core/module.hpp | 13 + src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp | 3 ++- src/gallium/state_trackers

[Mesa-dev] [PATCH v5 09/21] clover: Disallow creating libraries from other libraries

2018-03-25 Thread Pierre Moreau
If creating a library, do not allow non-compiled object in it, as executables are not allowed, and libraries would make it really hard to enforce the "-enable-link-options" flag. Reviewed-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Aaron Watry <awa...@gmail.com>

[Mesa-dev] [PATCH v5 06/21] clover/device: Replace usage of "1 << PIPE_SHADER_IR_*" with supports_ir

2018-03-25 Thread Pierre Moreau
Reviewed-by: Aaron Watry <awa...@gmail.com> Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/core/device.cpp | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gall

[Mesa-dev] [PATCH v5 03/21] clover/api: Fix tab indentation to spaces

2018-03-25 Thread Pierre Moreau
Acked-by: Francisco Jerez <curroje...@riseup.net> Reviewed-by: Karol Herbst <kher...@redhat.com> Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/device.cpp | 2 +- 1 file changed, 1

[Mesa-dev] [PATCH v5 15/21] include/CL: Add cl_khr_il_program

2018-03-25 Thread Pierre Moreau
Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- include/CL/cl_ext.h | 37 + 1 file changed, 37 insertions(+) diff --git a/include/CL/cl_ext.h b/include/CL/cl_ext.h index 5078e8f45f..5ea49

[Mesa-dev] [PATCH v5 07/21] clover/api: Rework the validation of devices for building

2018-03-25 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/program.cpp | 23 +- src/gallium/state_trackers/clover/core/program.cpp | 3 ++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/gallium/state_trackers/

[Mesa-dev] [PATCH v5 00/21] Introducing SPIR-V support to clover

2018-03-25 Thread Pierre Moreau
for: * Patch 07: “clover/api: Rework the validation of devices for building”; * Patch 14: “clover/llvm: Allow translating from SPIR-V to LLVM IR”; * Patch 18: “clover: Handle CL_PROGRAM_IL in clGetProgramInfo” Karol Herbst (1): clover: update ICD table to support everything up to 2.2 Pierre Moreau

[Mesa-dev] [PATCH v5 08/21] clover/api: Fail if trying to build a non-executable binary

2018-03-25 Thread Pierre Moreau
From the OpenCL 1.2 Specification, Section 5.6.2 (about clBuildProgram): > If program is created with clCreateProgramWithBinary, then the > program binary must be an executable binary (not a compiled binary or > library). Reviewed-by: Aaron Watry <awa...@gmail.com> Signed-off-by

[Mesa-dev] [PATCH v5 05/21] clover: Add an helper for checking if an IR is supported

2018-03-25 Thread Pierre Moreau
Reviewed-by: Aaron Watry <awa...@gmail.com> Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/core/device.cpp | 6 ++ src/gallium/state_trackers/clover/core/device.hpp | 1 + 2 files cha

[Mesa-dev] [PATCH v5 17/21] clover: Implement clCreateProgramWithILKHR

2018-03-25 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Changes in v5: * Use is_binary_spirv and is_valid_spirv from the SPIR-V backend; * Drop the SPIRV-Tools and llvm-spirv dependencies on clover. src/gallium/state_trackers/clover/api/dispatch.hpp | 4 ++ src/gallium/state_trackers/

[Mesa-dev] [PATCH v5 20/21] clover: Advertise cl_khr_il_program

2018-03-25 Thread Pierre Moreau
Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/platform.cpp | 2 ++ src/gallium/state_trackers/clover/core/device.cpp | 8 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH v5 16/21] clover/spirv: Add functions for validating SPIR-V binaries

2018-03-25 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- New in v5 src/gallium/state_trackers/clover/Makefile.am | 15 ++- src/gallium/state_trackers/clover/Makefile.sources | 4 + src/gallium/state_trackers/clover/meson.build | 10 +- .../state_trackers/clover/spirv/invocati

[Mesa-dev] [PATCH v5 21/21] clover: Implement clCreateProgramWithIL from OpenCL 2.1

2018-03-25 Thread Pierre Moreau
Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +- src/gallium/state_trackers/clover/api/program.cpp | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH v5 18/21] clover: Handle CL_PROGRAM_IL in clGetProgramInfo

2018-03-25 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/program.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 3c7e56efb9..851a

[Mesa-dev] [PATCH v5 13/21] configure.ac, meson: Check for SPIRV-Tools and llvm-spirv

2018-03-25 Thread Pierre Moreau
Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Changes in v5: * Add a comment saying where to find llvm-spirv (Karol Herbst). configure.ac | 18 ++ meson.build | 8 2 files changed, 26 insertions(+)

[Mesa-dev] [PATCH v5 19/21] clover/api: Implement CL_DEVICE_IL_VERSION

2018-03-25 Thread Pierre Moreau
Reviewed-by: Karol Herbst <kher...@redhat.com> Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- src/gallium/state_trackers/clover/api/device.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_tra

Re: [Mesa-dev] [PATCH 4/5 v6] clover/llvm: Add get_[cl|language]_version, validation and some helpers

2018-03-18 Thread Pierre Moreau
1+ use the version specified > 2) If not, use the highest 1.x version that the device supports > > Curiously, there is no valid value for -cl-std=CL1.0 > > Validates requested cl-std against device_clc_version > > Signed-off-by: Aaron Watry <awa...@gmail.com> > C

Re: [Mesa-dev] [PATCH 5/5] clover: Dynamically calculate __OPENCL_VERSION__ and CLC language version

2018-03-21 Thread Pierre Moreau
Oops, sorry. Reviewed-by: Pierre Moreau <pierre.mor...@free.fr> Thanks again for the series! Pierre On 2018-03-20 — 20:23, Aaron Watry wrote: > ping. > > This is the last of the series that still needs review. > > --Aaron > > On Thu, Mar 1, 2018 at 1:39 PM, Aa

Re: [Mesa-dev] [PATCH 4/5] clover/llvm: Add get_[cl|language]_version, validation and some helpers

2018-03-01 Thread Pierre Moreau
On 2018-03-01 — 22:43, Pierre Moreau wrote: > On 2018-03-01 — 13:39, Aaron Watry wrote: > > Used to calculate the default CLC language version based on the --cl-std in > > build args > > and the device capabilities. > > > > According to section 5.8.4.5 of the 2.0

Re: [Mesa-dev] [PATCH 4/5] clover/llvm: Add get_[cl|language]_version, validation and some helpers

2018-03-01 Thread Pierre Moreau
1+ use the version specified > 2) If not, use the highest 1.x version that the device supports > > Curiously, there is no valid value for -cl-std=CL1.0 > > Validates requested cl-std against device_clc_version > > Signed-off-by: Aaron Watry <awa...@gmail.com> > C

Re: [Mesa-dev] [PATCH 1/5] clover/llvm: Use device in llvm compilation instead of copying fields

2018-03-01 Thread Pierre Moreau
the patches are squashed together or not, but with Jan’s comment about the unused variable in patch 2 addressed, patches 1, 2 and 3 are Reviewed-by: Pierre Moreau <pierre.mor...@free.fr> Thank you for resending an updated version of this series. Pierre On 2018-03-01 — 13:39, Aaron Watry

Re: [Mesa-dev] [PATCH 1/2] clover: Allow overriding platform/device version numbers

2018-03-01 Thread Pierre Moreau
Reviewed-by: Pierre Moreau <pierre.mor...@free.fr> On 2018-03-01 — 13:44, Aaron Watry wrote: > Useful for testing API, builtin library, and device completeness of > not-yet-supported versions. > > Signed-off-by: Aaron Watry <awa...@gmail.com> > Cc: Pierre Moreau <pi

Re: [Mesa-dev] [PATCH v3] clover: Allow overriding platform/device version numbers

2018-03-05 Thread Pierre Moreau
With Francisco’s comments addressed, Reviewed-by: Pierre Moreau <pierre.mor...@free.fr> On 2018-03-04 — 09:13, Aaron Watry wrote: > Useful for testing API, builtin library, and device completeness of > not-yet-supported versions. > > Signed-off-by: Aaron Watry <awa...@gmail

[Mesa-dev] [RFC] clover/meson: Ignore 'svn' suffix when computing CLANG_RESOURCE_DIR

2019-01-06 Thread Pierre Moreau
in “configure.ac” when using autotools. Signed-off-by: Pierre Moreau --- I am not that familiar with Meson yet and couldn’t found a better way to extract the version numbers from the version string than splitting the version string on the ‘s’ character. src/gallium/state_trackers/clover/meson.build

[Mesa-dev] [PATCH v11 12/20] configure.ac, meson: Check for SPIRV-Tools and llvm-spirv

2019-01-16 Thread Pierre Moreau
; - Add a dependency on llvm-spirv. Signed-off-by: Pierre Moreau --- Dylan, I dropped your Rb since the modification were substantial, even though you were the one asking for them. I could easily have gotten them wrong. :-) configure.ac | 38 ++ meson.build

Re: [Mesa-dev] [PATCH v10 09/20] clover: Track flags per module section

2019-01-20 Thread Pierre Moreau
On 2019-01-18 — 16:04, Francisco Jerez wrote: [snip] > > diff --git a/src/gallium/state_trackers/clover/core/module.hpp > > b/src/gallium/state_trackers/clover/core/module.hpp > > index 2ddd26426fb..ff7e9b6234a 100644 > > --- a/src/gallium/state_trackers/clover/core/module.hpp > > +++

Re: [Mesa-dev] [PATCH v10 06/20] clover/api: Rework the validation of devices for building

2019-01-20 Thread Pierre Moreau
Thank you for the review. Do you think you’ll have the opportunity to have a look at patches 13 and 16? (Patch 15 is also missing a review, but I found some improvements to be made there.) Thanks, Pierre On 2019-01-18 — 15:52, Francisco Jerez wrote: > Pierre Moreau writes: > > &

[Mesa-dev] [PATCH v11 15/20] clover/spirv: Add functions for validating SPIR-V binaries

2019-01-21 Thread Pierre Moreau
translating from SPIR-V to LLVM IR” in the v6. Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/Makefile.am | 17 ++- .../state_trackers/clover/Makefile.sources| 4 + src/gallium/state_trackers/clover/meson.build | 11 +- .../clover/spirv/invocation.cpp

[Mesa-dev] [PATCH v10 12/20] configure.ac, meson: Check for SPIRV-Tools and llvm-spirv

2019-01-08 Thread Pierre Moreau
on llvm-spirv. Signed-off-by: Pierre Moreau --- configure.ac | 18 ++ meson.build | 8 2 files changed, 26 insertions(+) diff --git a/configure.ac b/configure.ac index e4d20054d5f..799246e8319 100644 --- a/configure.ac +++ b/configure.ac @@ -2513,6 +2513,24

[Mesa-dev] [PATCH v10 14/20] include/CL: Add cl_khr_il_program

2019-01-08 Thread Pierre Moreau
Reviewed-by: Karol Herbst Signed-off-by: Pierre Moreau --- include/CL/cl_ext.h | 37 + 1 file changed, 37 insertions(+) diff --git a/include/CL/cl_ext.h b/include/CL/cl_ext.h index 5078e8f45f0..5ea49680423 100644 --- a/include/CL/cl_ext.h +++ b/include/CL

[Mesa-dev] [PATCH v10 13/20] clover/llvm: Allow translating from SPIR-V to LLVM IR

2019-01-08 Thread Pierre Moreau
of a bidirectional stringstream, and initialise it directly (Francisco Jerez). Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/Makefile.am | 6 +++- .../state_trackers/clover/llvm/invocation.cpp | 29 +++ .../state_trackers/clover/llvm/invocation.hpp | 6

[Mesa-dev] [PATCH v10 15/20] clover/spirv: Add functions for validating SPIR-V binaries

2019-01-08 Thread Pierre Moreau
name (meson) and the libs variable (Makefile) due to the replacement of llvm-spirv to the new official SPIRV-LLVM-Translator. * v5: Changed to match the updated “clover/llvm: Allow translating from SPIR-V to LLVM IR” in the v6. Signed-off-by: Pierre Moreau --- src/gallium

[Mesa-dev] [PATCH v10 19/20] clover: Advertise cl_khr_il_program

2019-01-08 Thread Pierre Moreau
Reviewed-by: Karol Herbst Changes since: * v3: do not advertise SPIR-V support if CLOVER_ALLOW_SPIRV is not defined * v2: advertise cl_khr_il_program if if the device support NATIVE as IR Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/platform.cpp | 2 ++ src

[Mesa-dev] [PATCH v10 16/20] clover: Implement clCreateProgramWithILKHR

2019-01-08 Thread Pierre Moreau
initialise the devices associated to a program created from clCreateProgramWithILKHR; - Introduce free functions for validating the SPIR-V binary, and detecting the IL used in the binary fed to clCreateProgramWithILKHR. Signed-off-by: Pierre Moreau --- .../state_trackers/clover/api

[Mesa-dev] [PATCH v10 20/20] clover: Implement clCreateProgramWithIL from OpenCL 2.1

2019-01-08 Thread Pierre Moreau
Reviewed-by: Karol Herbst Change since: * v2: Remove the const from the length argument of clCreateProgramWithIL Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +- src/gallium/state_trackers/clover/api/program.cpp | 8 2 files changed, 9

[Mesa-dev] [PATCH v10 17/20] clover: Handle CL_PROGRAM_IL in clGetProgramInfo

2019-01-08 Thread Pierre Moreau
Reviewed-by: Karol Herbst Changes since: * v3: Use the core define instead of the extension one (Karol Herbst) * v2: Switch from using a pointer attribute to a vector (Francisco Jerez) Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/program.cpp | 7 +++ 1 file

[Mesa-dev] [PATCH v10 18/20] clover/api: Implement CL_DEVICE_IL_VERSION

2019-01-08 Thread Pierre Moreau
Reviewed-by: Karol Herbst Changes since: * v3: Use the core define instead of the extension one (Karol Herbst) * v2: Throw an exception if the cl_khr_il_program extension is not supported (Francisco Jerez) Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/device.cpp

[Mesa-dev] [PATCH v10 04/20] clover: Add an helper for checking if an IR is supported

2019-01-08 Thread Pierre Moreau
Reviewed-by: Aaron Watry Reviewed-by: Karol Herbst Changes since: * v2: - Dropped supported_irs() (Francisco Jerez) - Changed supports_ir() argument type to `enum pipe_shader_ir` (Francisco Jerez) Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/core/device.cpp | 6

[Mesa-dev] [PATCH v10 07/20] clover/api: Fail if trying to build a non-executable binary

2019-01-08 Thread Pierre Moreau
From the OpenCL 1.2 Specification, Section 5.6.2 (about clBuildProgram): > If program is created with clCreateProgramWithBinary, then the > program binary must be an executable binary (not a compiled binary or > library). Reviewed-by: Aaron Watry Signed-off-by: Pierre Moreau --- sr

[Mesa-dev] [PATCH v10 03/20] clover: Remove the TGSI backend as unused

2019-01-08 Thread Pierre Moreau
Reviewed-by: Karol Herbst Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/Makefile.am | 11 +- .../state_trackers/clover/Makefile.sources| 4 - .../state_trackers/clover/core/program.cpp| 13 +- src/gallium/state_trackers/clover/meson.build | 10

[Mesa-dev] [PATCH v10 05/20] clover/device: Replace usage of "1 << PIPE_SHADER_IR_*" with supports_ir

2019-01-08 Thread Pierre Moreau
Reviewed-by: Aaron Watry Reviewed-by: Karol Herbst Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/core/device.cpp | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover

[Mesa-dev] [PATCH v10 10/20] clover: Move device extensions definitions to core/device.cpp

2019-01-08 Thread Pierre Moreau
Reviewed-by: Francisco Jerez Reviewed-by: Aaron Watry Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/device.cpp | 11 +-- src/gallium/state_trackers/clover/core/device.cpp | 14 ++ src/gallium/state_trackers/clover/core/device.hpp | 1 + 3 files

[Mesa-dev] [PATCH v10 08/20] clover: Disallow creating libraries from other libraries

2019-01-08 Thread Pierre Moreau
the update of "clover/api: Rework the validation of devices for building” in the v6. * v2: Re-write the explanation as to why libraries can’t be created from other libraries (Francisco Jerez) Signed-off-by: Pierre Moreau --- .../state_trackers/clover/api/program.cpp | 21 +++

[Mesa-dev] [PATCH v10 09/20] clover: Track flags per module section

2019-01-08 Thread Pierre Moreau
the modification to the tgsi backend, as already dropped (Aaron Watry) Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/core/module.cpp | 1 + src/gallium/state_trackers/clover/core/module.hpp | 13 + .../state_trackers/clover/llvm/codegen/bitcode.cpp | 3

[Mesa-dev] [PATCH v10 06/20] clover/api: Rework the validation of devices for building

2019-01-08 Thread Pierre Moreau
a list of devices (Francisco Jerez); - Dropped duplicate checks (Francisco Jerez). Signed-off-by: Pierre Moreau --- .../state_trackers/clover/api/program.cpp | 18 +- .../state_trackers/clover/core/program.cpp | 3 ++- 2 files changed, 11 insertions(+), 10 deletions

[Mesa-dev] [PATCH v10 11/20] clover: Move platform extensions definitions to clover/platform.cpp

2019-01-08 Thread Pierre Moreau
Reviewed-by: Francisco Jerez Reviewed-by: Aaron Watry Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/api/platform.cpp | 4 ++-- src/gallium/state_trackers/clover/core/platform.cpp | 5 + src/gallium/state_trackers/clover/core/platform.hpp | 2 ++ 3 files changed, 9

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

2019-01-08 Thread Pierre Moreau
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

[Mesa-dev] [PATCH v10 02/20] clover: update ICD table to support everything up to 2.2

2019-01-08 Thread Pierre Moreau
From: Karol Herbst v6: Fix return type of clCreateCommandQueueWithProperties v2: add more prototypes Reviewed-by: Pierre Moreau Signed-off-by: Karol Herbst Signed-off-by: Pierre Moreau --- .../state_trackers/clover/api/dispatch.cpp| 29 ++- .../state_trackers/clover/api/dispatch.hpp

Re: [Mesa-dev] [RFC] clover/meson: Ignore 'svn' suffix when computing CLANG_RESOURCE_DIR

2019-01-07 Thread Pierre Moreau
On 2019-01-07 — 11:34, Dylan Baker wrote: [snip] > I think you can just use dep_llvm.version() now, which does split the 'svn' or > 'git' off the end already. When this was written it didn't do that. Thanks, it does indeed work and feels way less hacky than my split; I’ll send a v2 shortly.

[Mesa-dev] [PATCH v2] clover/meson: Ignore 'svn' suffix when computing CLANG_RESOURCE_DIR

2019-01-07 Thread Pierre Moreau
” suffix from the version when using the dependency’s `version()` method. This processing is already performed in “configure.ac” when using autotools. Signed-off-by: Pierre Moreau --- v2: * Replace the initial solution using a `split()`, by instead directly using Meson’s own `version()` function

Re: [Mesa-dev] [PATCH v10 12/20] configure.ac, meson: Check for SPIRV-Tools and llvm-spirv

2019-01-09 Thread Pierre Moreau
On 2019-01-08 — 15:18, Dylan Baker wrote: [snip] > >dep_clc = dependency('libclc') > > + dep_spirv_tools = dependency('SPIRV-Tools', required : false, version : > > '>= 2018.0') > > + # LLVMSPIRVLib is available at > > https://github.com/KhronosGroup/SPIRV-LLVM-Translator > > +

Re: [Mesa-dev] [PATCH v10 12/20] configure.ac, meson: Check for SPIRV-Tools and llvm-spirv

2019-01-09 Thread Pierre Moreau
> thanks! Just FYI, our meson build uses - in option names, not _. And, I'd > prefer > just "opencl-spirv". Err right, I meant with '-' in the option name. I am fine with "opencl-spirv"; I was initially going with "gallium-opencl-spirv" since the other clover-related command was named

[Mesa-dev] [PATCH] meson: Fix with_gallium_icd to with_opencl_icd

2019-01-09 Thread Pierre Moreau
`with_gallium_icd` is never used throughout the different Meson build files, whereas `with_opencl_icd` tracks whether or not `gallium-opencl` was set to "icd". Signed-off-by: Pierre Moreau --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mes

Re: [Mesa-dev] [PATCH] nvir: Always split 64-bit IMAD/IMUL operations

2018-09-17 Thread Pierre Moreau
Hello Dylan, It looks fine to me as well. Thank you for fixing the merge conflict. Pierre On 2018-09-14 — 09:16, Dylan Baker wrote: > Quoting Pierre Moreau (2017-12-04 15:51:04) > > Those operations do not map to actual hardware instructions, therefore > > those should always b

[Mesa-dev] [PATCH v12 15/20] clover/spirv: Add functions for validating SPIR-V binaries

2019-01-28 Thread Pierre Moreau
: Changed to match the updated “clover/llvm: Allow translating from SPIR-V to LLVM IR” in the v6. Signed-off-by: Pierre Moreau --- src/gallium/state_trackers/clover/Makefile.am | 17 ++- .../state_trackers/clover/Makefile.sources| 4 + src/gallium/state_trackers/clover/meson.build | 11

<    1   2   3   4   >