Mesa (master): nir/lower_explicit_io: Assert that compute address sizes match derefs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 1 21:03:16 UTC 2020
Module: Mesa
Branch: master
Commit: c93ade93fb98b3eca45ee42ec0638ec055f39e7a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c93ade93fb98b3eca45ee42ec0638ec055f39e7a
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Fri Aug 21 16:55:02 2020 -0500
nir/lower_explicit_io: Assert that compute address sizes match derefs
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
---
src/compiler/nir/nir_lower_io.c | 2 ++
1 file changed, 2 insertions(+)
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));
More information about the mesa-commit
mailing list