Re: [Mesa-dev] Installing Mesa OpenCL for Nvidia?

2021-07-31 Thread Pierre Moreau
Hello Murray, OpenCL is currently not exposed by the nv50 driver — the one used by your 9400 GT as well as the 9800 GT when using Nouveau. It is a work-in-progress though and I could give you some instructions on how to get it going, but bear in mind that you will need to build a custom version

Re: [Mesa-dev] Trying to build a opencl dev env

2021-04-27 Thread Pierre Moreau
Hello Luke, If you set `PKG_CONFIG_PATH=$PATH_TO_LIBCLC_INSTALL/share/pkgconfig` when running meson, it should pick that version instead of the system one. I run it as `PKG_CONFIG_PATH=[…] meson setup […]`; it might also be possible to pass it as an argument instead, I do not know. Best, Pierre

Re: [Mesa-dev] [ANNOUNCE] Mesa 20.0 branchpoint planned for 2020/01/29, Milestone opened

2020-01-30 Thread Pierre Moreau
On 2020-01-31 — 01:48, Dieter Nützel wrote: > @Pierre and Karol > Now I get this with 'llvmorg-10.0.0-rc1' and current 'SPIRV-LLVM-Translator' > master: I’m recompiling LLVM to that tag and see what I get, but it looks like for some reason it forgets to link against LLVMSPIRVLib, which is

Re: [Mesa-dev] [ANNOUNCE] Mesa 20.0 branchpoint planned for 2020/01/29, Milestone opened

2020-01-29 Thread Pierre Moreau
On 2020-01-30 — 07:23, Dieter Nützel wrote: > Ugh, LLVM git now at 11.0...missed that. > SPIRV-LLVM-Translator choke with 11.0 git (I think it was the same with 10.0 > git), here. (See below.) > So I can't compile Mesa git (20.0) with '-Dopencl-spirv=true' since November > (15.11.2019). The

Re: [Mesa-dev] [PATCH 07/15] clover/spirv: Add functions for parsing arguments, linking programs, etc.

2019-05-22 Thread Pierre Moreau
> > + throw build_error(); \ > > + } > > + > > + switch (dim) { > > + case SpvDim2D: > > + APPEND_DIM(2d) > > I was shortly confused about whether this could fall through. It would > be cleaner to do this with a single if/else ladder like >

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

2019-05-13 Thread Pierre Moreau
> > + auto const level_to_string = [](spv_message_level_t level){ > > "const auto" would be more idiosyncratic. > > > + switch (level) { > > +case SPV_MSG_FATAL: > > + return std::string("Fatal"); > > +case SPV_MSG_INTERNAL_ERROR: > > +

Re: [Mesa-dev] [PATCH] nv50/ir/nir: make use of SYSTEM_VALUE_MAX when iterating read sysvals

2019-05-12 Thread Pierre Moreau
Reviewed-by: Pierre Moreau On 2019-05-12 — 15:56, Karol Herbst wrote: > Signed-off-by: Karol Herbst > --- > src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/drive

Re: [Mesa-dev] [PATCH] nv50/ir/nir: prefer to shift 1ull instead of 1ll

2019-05-12 Thread Pierre Moreau
Reviewed-by: Pierre Moreau On 2019-05-12 — 15:51, Karol Herbst wrote: > Signed-off-by: Karol Herbst > Suggested-by: Ilia Mirkin > --- > src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

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

2019-01-30 Thread Pierre Moreau
On 2019-01-20 — 16:59, Pierre Moreau wrote: [snip] > > Is this patch being used at all in this series? > > Not in this one, but it will be in the next merge request which adds support > for SPIR-V as a second main IR in clover alongside LLVM IR. > I’ll drop this patch from t

[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

[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

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: > > &

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 > > +++

[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

[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 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

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 > > +

[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 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 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 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 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 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 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 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 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 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 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 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 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

[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 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] [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] [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

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

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

2018-07-17 Thread Pierre Moreau
view: "clover: update ICD table to > support everything up to 2.2" > > On Sun, Jul 15, 2018 at 9:26 PM, Pierre Moreau wrote: > > Hello, > > > > I would appreciate if the following patches could be reviewed: > > * Patch 07 (latest: v6): clover

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

2018-07-15 Thread Pierre Moreau
/pierremoreau/mesa/commits/clover_spirv_series_v8 Thank you in advance, Pierre On 2018-05-23 — 23:58, Pierre Moreau wrote: > Hello everyone, > > I updated a few patches of the series to have it use the new official > SPIR-V <-> LLVM translator, that can be found at &g

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

2018-06-05 Thread Pierre Moreau
Signed-off-by: Pierre Moreau --- Notes: Changes in: * v8: Add DEFINES to libclspirv and libclover, in autotools, as they would otherwise never know whether CLOVER_ALLOW_SPIRV has been defined (Dave Airlie) * v7: Update the dependency name (meson) and the libs variable

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

2018-06-05 Thread Pierre Moreau
Reviewed-by: Karol Herbst Reviewed-by: Dylan Baker Signed-off-by: Pierre Moreau --- Notes: Changes in: * v8: * Properly align LLVMSPIRVLib comment (Dylan Baker) * Only define CLOVER_ALLOW_SPIRV when **both** dependencies are found: autotools was only requiring one

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

2018-05-26 Thread Pierre Moreau
On 2018-05-23 — 15:51, Dylan Baker wrote: > Quoting Pierre Moreau (2018-05-23 14:43:10) > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > --- > > Changes in: > > - v7: Replace the llvm-spirv repository by the new official > > SPIRV-LLVM

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

2018-05-23 Thread Pierre Moreau
clover: Implement clCreateProgramWithILKHR; * and the three patches I just resent as v7. Thank you. Pierre On 2018-03-25 — 20:02, Pierre Moreau wrote: > Hello, > > This has only minor changes compared to the previous version, but as it > introduces a new patch, I preferred to resen

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

2018-05-23 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Changes in: - v7: Update the dependency name (meson) and the libs variable (Makefile) due to the replacement of llvm-spirv to the new official SPIRV-LLVM-Translator src/gallium/state_trackers/clover/Makefile.am

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

2018-05-23 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Changes in: - v7: Update the LLVM API call due to the replacement of llvm-spirv to the new official SPIRV-LLVM-Translator src/gallium/state_trackers/clover/Makefile.am | 6 +++- .../state_trackers/clover/llvm/invocation.cp

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

2018-05-23 Thread Pierre Moreau
Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- Changes in: - v7: Replace the llvm-spirv repository by the new official SPIRV-LLVM-Translator configure.ac | 18 ++ meson.build | 8 2 files changed, 26 insertions(+) diff --git a/configur

Re: [Mesa-dev] [PATCH 1/2] util/u_math: Implement a logbase2 function for unsigned long

2018-05-23 Thread Pierre Moreau
On 2018-05-23 — 12:12, Eric Engestrom wrote: > On Tuesday, 2018-05-22 23:06:16 +0200, Karol Herbst wrote: > > From: Pierre Moreau <pierre.mor...@free.fr> > > > > Signed-off-by: Karol Herbst <kher...@redhat.com> > > --- > &

Re: [Mesa-dev] [RFC 3/3] clover+gallium+freedreno: caps to reduce kernel recompiles

2018-04-26 Thread Pierre Moreau
The cap would need to be added to the documentation as well, in “src/gallium/docs/source/screen.rst”. I might be wrong, but I think you are going to break all existing drivers in clover, that do not yet support the new cap: for unsupported caps, drivers return a value of 0, which means they would

[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 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 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 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 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 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 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

[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 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 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 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 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 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 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 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 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 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 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 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

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 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 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

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 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

[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 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 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 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 +++

[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 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 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 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 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 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 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 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 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 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 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

  1   2   3   4   >