Re: [Mesa-dev] [PATCH v2 1/7] nv50/ir: add nv50_ir_prog_info_out

2020-03-05 Thread Karol Herbst
On Wed, Mar 4, 2020 at 6:37 PM Emil Velikov wrote: > > Hi Mark, > > On Fri, 21 Feb 2020 at 12:20, Mark Menzynski wrote: > > > - ret = nv50_ir_generate_code(info); > > + /* these fields might be overwritten by the compiler */ > > + info_out.bin.smemSize = prog->cp.smem_size; > > + info_out

[Mesa-dev] [PATCH] nv50/ir: get rid of smemSize

2020-03-06 Thread Karol Herbst
we can rely on the value we get through the cso Signed-off-by: Karol Herbst --- src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h | 1 - src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 1 - src/gallium/drivers/nouveau/nv50/nv50_program.c | 4 +--- src/gallium/drivers

Re: [Mesa-dev] [PATCH] nv50/ir: get rid of smemSize

2020-03-06 Thread Karol Herbst
please ignore, there is actually a use of that, but not through TGSI. On Fri, Mar 6, 2020 at 3:07 PM Karol Herbst wrote: > > we can rely on the value we get through the cso > > Signed-off-by: Karol Herbst > --- > src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h |

Re: [Mesa-dev] [RFC PATCH v2 1/6] nv50/ir: add nv50_ir_prog_info_out

2020-03-20 Thread Karol Herbst
On Fri, Mar 20, 2020 at 10:20 AM Juan A. Suarez Romero wrote: > > On Thu, 2020-03-19 at 21:57 +0100, Mark Menzynski wrote: > > From: Karol Herbst > > > > Split out the output relevant fields from the nv50_ir_prog_info struct > > in order to have a cleaner separatio

Re: [Mesa-dev] OpenGL and OpenCL on top of D3D12

2020-03-24 Thread Karol Herbst
On Tue, Mar 24, 2020 at 5:39 PM Gert Wollny wrote: > > Dear Mesa developers, > > Today, we at Collabora together with Microsoft have announced a new > project based on Mesa: OpenGL and OpenCL on top of Microsoft's D3D12. > You can find the full announcements here: > > https://www.collabora.com/ne

[Mesa-dev] [PATCH 02/15] nv50/ir/nir: don't assert on !main

2019-05-11 Thread Karol Herbst
required for OpenCL Signed-off-by: Karol Herbst Reviewed-by: Pierre Moreau --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen

[Mesa-dev] [PATCH 01/15] nv50/ir/nir: parse system values first and stop for compute shaders

2019-05-11 Thread Karol Herbst
required by OpenCL Signed-off-by: Karol Herbst Reviewed-by: Pierre Moreau --- .../nouveau/codegen/nv50_ir_from_nir.cpp | 61 ++- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers

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

2019-05-11 Thread Karol Herbst
From: Pierre Moreau Changes since: * v12: remove autotools (Karol Herbst) * v11: Fix compilation error introduced in v11. * v10: - Reuse format_validation_msg in is_valid_spirv. - Remove LVL2STR macro in format_validation_msg. * v9: Add `clover_cpp_std` to the overrides of the `libclspirv

[Mesa-dev] [PATCH 05/15] meson: Check for SPIRV-Tools and llvm-spirv

2019-05-11 Thread Karol Herbst
From: Pierre Moreau Changes since: * v11 (Karol Herbst): - only set new defines for clover to speed up recompilation - remove autotools * v10: - Add a new flag (`--enable-opencl-spirv` for autotools, and `-Dopencl-spirv=true` for meson) for enabling SPIR-V support in clover, and

[Mesa-dev] [PATCH 10/15] gallium: add blob field to pipe_llvm_program_header

2019-05-11 Thread Karol Herbst
makes it easier to consume a IR_NATIVE binary Signed-off-by: Karol Herbst Reviewed-by: Francisco Jerez --- src/gallium/drivers/r600/evergreen_compute.c | 4 +--- src/gallium/drivers/radeonsi/si_compute.c | 4 +--- src/gallium/include/pipe/p_state.h

[Mesa-dev] [PATCH 09/15] clover/llvm: Add functions for compiling from source to SPIR-V

2019-05-11 Thread Karol Herbst
From: Pierre Moreau Reviewed-by: Karol Herbst --- .../state_trackers/clover/llvm/invocation.cpp | 100 +++--- .../state_trackers/clover/llvm/invocation.hpp | 8 ++ src/gallium/state_trackers/clover/meson.build | 2 +- 3 files changed, 92 insertions(+), 18 deletions(-) diff

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

2019-05-11 Thread Karol Herbst
From: Pierre Moreau v2 (Karol Herbst): silence warnings about unhandled enum values --- .../clover/spirv/invocation.cpp | 598 ++ .../clover/spirv/invocation.hpp | 12 + 2 files changed, 610 insertions(+) diff --git a/src/gallium/state_trackers

[Mesa-dev] [PATCH 15/15] nvc0: expose spirv support

2019-05-11 Thread Karol Herbst
required for OpenCL Signed-off-by: Karol Herbst --- src/gallium/drivers/nouveau/nouveau_screen.c | 1 + src/gallium/drivers/nouveau/nouveau_screen.h | 1 + src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 14 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.h | 2 ++ src

[Mesa-dev] [PATCH 13/15] gallium: add entry_point field to pipe_compute_state

2019-05-11 Thread Karol Herbst
. Signed-off-by: Karol Herbst --- src/gallium/include/pipe/p_state.h| 1 + src/gallium/state_trackers/clover/core/kernel.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index c94dfb0ba78..d043f0d19af 100644

[Mesa-dev] [PATCH 08/15] clover/llvm: Add options for dumping SPIR-V binaries

2019-05-11 Thread Karol Herbst
From: Pierre Moreau Reviewed-by: Karol Herbst --- .../state_trackers/clover/llvm/util.hpp | 4 ++- .../clover/spirv/invocation.cpp | 30 +++ .../clover/spirv/invocation.hpp | 4 +++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 03/15] nv50/ir/nir: handle kernel inputs

2019-05-11 Thread Karol Herbst
required by OpenCL Signed-off-by: Karol Herbst Reviewed-by: Pierre Moreau --- .../nouveau/codegen/nv50_ir_from_nir.cpp | 21 --- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers

[Mesa-dev] [PATCH 00/15] Clover: support CL through SPIR-V

2019-05-11 Thread Karol Herbst
library to convert llvm to spirv. Karol Herbst (10): nv50/ir/nir: parse system values first and stop for compute shaders nv50/ir/nir: don't assert on !main nv50/ir/nir: handle kernel inputs nv50/ir/nir: implement load/store_global gallium: add blob field to pipe_llvm_program_h

[Mesa-dev] [PATCH 12/15] nir/spirv: add spirv_to_nir_cl

2019-05-11 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/Makefile.sources| 1 + src/compiler/nir/meson.build | 1 + src/compiler/spirv/nir_spirv.h | 4 + src/compiler/spirv/spirv_to_nir_cl.c | 124 +++ 4 files changed, 130 insertions(+) create mode 100644

[Mesa-dev] [PATCH 04/15] nv50/ir/nir: implement load/store_global

2019-05-11 Thread Karol Herbst
required by OpenCL v2: fix setting globalAccess Signed-off-by: Karol Herbst Reviewed-by: Pierre Moreau --- .../nouveau/codegen/nv50_ir_from_nir.cpp | 36 +++ 1 file changed, 36 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src

[Mesa-dev] [PATCH 14/15] clover: add support for consuming spirv

2019-05-11 Thread Karol Herbst
v2: rework arguments to compiler::compile_program add assert to device::ir_format Signed-off-by: Karol Herbst Reviewed-by: Francisco Jerez --- src/gallium/include/pipe/p_defines.h | 1 + .../state_trackers/clover/core/compiler.hpp | 68 +++ .../state_trackers

[Mesa-dev] [PATCH 11/15] rename pipe_llvm_program_header to pipe_binary_program_header

2019-05-11 Thread Karol Herbst
We want to use it for other formats as well, so give it a more generic name Signed-off-by: Karol Herbst Reviewed-by: Francisco Jerez --- src/gallium/drivers/r600/evergreen_compute.c | 2 +- src/gallium/drivers/radeonsi/si_compute.c | 2 +- src/gallium/include/pipe

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

2019-05-12 Thread Karol Herbst
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 a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen

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

2019-05-12 Thread Karol Herbst
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/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp index 7e59b83e8fc

Re: [Mesa-dev] undefined behaviour in spirv_to_nir.c

2019-05-16 Thread Karol Herbst
ohhh, yeah.. I think we can actually just remove that code, as it shouldn't have any affect on the constants value. On Fri, May 17, 2019 at 4:07 AM Jason Ekstrand wrote: > > I think it's fine but I'm not at my computer right now. > > --Jason > > On May 16, 2019 20:58:03 Dave Airlie wrote: > > >

Re: [Mesa-dev] undefined behaviour in spirv_to_nir.c

2019-05-17 Thread Karol Herbst
l points > out, it probably is safe to just delete. However, I'd feel slightly better > about it if we figured out the right bit size and just called > nir_eval_const_opcode to do a u2u32 on the value. > > --Jason > > On Fri, May 17, 2019 at 1:24 AM Karol Herbst wrote: &g

Re: [Mesa-dev] [PATCH] nouveau: fix frees in unsupported IR error paths.

2019-06-18 Thread Karol Herbst
ohh, nvm... I already know... On Tue, Jun 18, 2019 at 11:18 PM Karol Herbst wrote: > > On Tue, Jun 18, 2019 at 11:14 PM Dave Airlie wrote: > > > > From: Dave Airlie > > > > This is pointless in that we won't ever hit those paths in real life, > > but

Re: [Mesa-dev] [PATCH] nouveau: fix frees in unsupported IR error paths.

2019-06-18 Thread Karol Herbst
On Tue, Jun 18, 2019 at 11:14 PM Dave Airlie wrote: > > From: Dave Airlie > > This is pointless in that we won't ever hit those paths in real life, > but coverity complains. > what does it actually complain about? > Fixes: f014ae3c7cce ("nouveau: add support for nir") > --- > src/gallium/drive

<    5   6   7   8   9   10