From: Jason Ekstrand Date: Fri, 21 Aug 2020 22:23:59 +0000 (-0500) Subject: clover: Use 64-bit offsets for shader_in on 64-bit GPUs X-Git-Tag: upstream/21.0.0~5802 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=526f3566332e6fdf3bc413471a1a6e5ad091f0c5;p=platform%2Fupstream%2Fmesa.git clover: Use 64-bit offsets for shader_in on 64-bit GPUs This really shouldn't matter as inputs should have logical pointers. However, nir_builder defaults to building derefs based on the pointer size in the shader_info. It's easier for now to just be consistent everywhere. Reviewed-by: Karol Herbst Part-of: --- diff --git a/src/gallium/frontends/clover/nir/invocation.cpp b/src/gallium/frontends/clover/nir/invocation.cpp index 9246514..8ea6d3c 100644 --- a/src/gallium/frontends/clover/nir/invocation.cpp +++ b/src/gallium/frontends/clover/nir/invocation.cpp @@ -231,8 +231,10 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev, nir_var_mem_shared | nir_var_function_temp, glsl_get_cl_type_size_align); - /* use offsets for uniform and shared memory */ + /* use offsets for kernel inputs (uniform) */ NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_uniform, + nir->info.cs.ptr_size == 64 ? + nir_address_format_32bit_offset_as_64bit : nir_address_format_32bit_offset); NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_constant,