From 918e444f04552c74e805885caa0db66352fac2fd Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sat, 15 Aug 2020 13:33:29 +0200 Subject: [PATCH] clover/nir: Call vars_to_explicit_types for shared memory This is required for shared memory buffers declared with an explicit size inside the kernel. Signed-off-by: Karol Herbst Reviewed-by: Jesse Natalie Reviewed-by: Boris Brezillon Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/frontends/clover/nir/invocation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/frontends/clover/nir/invocation.cpp b/src/gallium/frontends/clover/nir/invocation.cpp index 36ee8c9a2ea..1faf8a6eb21 100644 --- a/src/gallium/frontends/clover/nir/invocation.cpp +++ b/src/gallium/frontends/clover/nir/invocation.cpp @@ -145,6 +145,9 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev, NIR_PASS_V(nir, nir_lower_vars_to_ssa); NIR_PASS_V(nir, nir_opt_dce); + NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, nir_var_mem_shared, + glsl_get_cl_type_size_align); + /* use offsets for shader_in and shared memory */ nir_variable_mode modes = (nir_variable_mode)( nir_var_shader_in | -- 2.30.2