From e2e89fb137c220e035403d8dc6d00d6c44a4f675 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 24 Jul 2020 16:34:43 +0200 Subject: [PATCH] nir/lower_io: assert that offsets are used for shader_in Signed-off-by: Karol Herbst Reviewed-by: Jesse Natalie Acked-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir_lower_io.c | 2 +- src/gallium/frontends/clover/nir/invocation.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 7e328e7ae55..b004c62b81e 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -845,7 +845,7 @@ build_explicit_io_load(nir_builder *b, nir_intrinsic_instr *intrin, op = nir_intrinsic_load_global; break; case nir_var_shader_in: - assert(addr_format_is_global(addr_format)); + assert(addr_format_is_offset(addr_format)); op = nir_intrinsic_load_kernel_input; break; case nir_var_mem_shared: diff --git a/src/gallium/frontends/clover/nir/invocation.cpp b/src/gallium/frontends/clover/nir/invocation.cpp index 730011b7885..8b52379314c 100644 --- a/src/gallium/frontends/clover/nir/invocation.cpp +++ b/src/gallium/frontends/clover/nir/invocation.cpp @@ -134,8 +134,8 @@ 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_explicit_io, nir_var_shader_in, nir_address_format_32bit_offset); nir_variable_mode modes = (nir_variable_mode)( - nir_var_shader_in | nir_var_mem_global | nir_var_mem_shared); nir_address_format format = nir->info.cs.ptr_size == 64 ? -- 2.30.2