From: Karol Herbst Date: Sun, 16 Aug 2020 15:43:18 +0000 (+0200) Subject: clover/nir: Lower function_temp to scratch. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d421af3a99374da72c1e661c15d9a46177b745d0;p=mesa.git clover/nir: Lower function_temp to scratch. Signed-off-by: Karol Herbst Reviewed-by: Jesse Natalie Reviewed-by: Boris Brezillon Reviewed-by: Jason Ekstrand Part-of: --- diff --git a/src/gallium/frontends/clover/nir/invocation.cpp b/src/gallium/frontends/clover/nir/invocation.cpp index 8d53f594c44..6801b607feb 100644 --- a/src/gallium/frontends/clover/nir/invocation.cpp +++ b/src/gallium/frontends/clover/nir/invocation.cpp @@ -226,7 +226,8 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev, offset += glsl_get_cl_size(var->type); } - NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, nir_var_mem_shared, + NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, + nir_var_mem_shared | nir_var_function_temp, glsl_get_cl_type_size_align); /* use offsets for uniform and shared memory */ @@ -236,9 +237,14 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev, NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_shared, spirv_options.shared_addr_format); + NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_function_temp, + spirv_options.temp_addr_format); + NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_global, spirv_options.global_addr_format); + NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_all, NULL); + if (compiler_options->lower_int64_options) NIR_PASS_V(nir, nir_lower_int64);