From b2226f7a98d6dc5b1c98ebfc93bac2857777bbf7 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 19 Aug 2020 11:32:32 -0500 Subject: [PATCH] clover/nir: Stop computing the global address format twice Reviewed-by: Karol Herbst Part-of: --- src/gallium/frontends/clover/nir/invocation.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/frontends/clover/nir/invocation.cpp b/src/gallium/frontends/clover/nir/invocation.cpp index 290d92ec22c..713ab3c4877 100644 --- a/src/gallium/frontends/clover/nir/invocation.cpp +++ b/src/gallium/frontends/clover/nir/invocation.cpp @@ -153,10 +153,8 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev, nir_var_mem_shared); NIR_PASS_V(nir, nir_lower_explicit_io, modes, nir_address_format_32bit_offset); - /* use global format for global memory */ - nir_address_format format = nir->info.cs.ptr_size == 64 ? - nir_address_format_64bit_global : nir_address_format_32bit_global; - NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_global, format); + NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_global, + spirv_options.global_addr_format); NIR_PASS_V(nir, nir_lower_system_values); if (compiler_options->lower_int64_options) -- 2.30.2