From: Jason Ekstrand Date: Fri, 21 Aug 2020 21:55:02 +0000 (-0500) Subject: nir/lower_explicit_io: Assert that compute address sizes match derefs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c93ade93fb98b3eca45ee42ec0638ec055f39e7a;p=mesa.git nir/lower_explicit_io: Assert that compute address sizes match derefs Reviewed-by: Jesse Natalie Part-of: --- diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 6fb90c6efbd..2cff415eb43 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -1376,6 +1376,8 @@ lower_explicit_io_deref(nir_builder *b, nir_deref_instr *deref, nir_ssa_def *addr = nir_explicit_io_address_from_deref(b, deref, base_addr, addr_format); + assert(addr->bit_size == deref->dest.ssa.bit_size); + assert(addr->num_components == deref->dest.ssa.num_components); nir_instr_remove(&deref->instr); nir_ssa_def_rewrite_uses(&deref->dest.ssa, nir_src_for_ssa(addr));