[Mesa-dev] [PATCH 3/3] nir: handle shared pointers in lowering indirect derefs.
Dave Airlie
airlied at gmail.com
Mon Nov 19 03:57:47 UTC 2018
From: Dave Airlie <airlied at redhat.com>
Check if the base ends up with no variable, and continue
if we see that case outside the loop.
---
src/compiler/nir/nir_lower_indirect_derefs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c b/src/compiler/nir/nir_lower_indirect_derefs.c
index 897a0620872..3d6452ac847 100644
--- a/src/compiler/nir/nir_lower_indirect_derefs.c
+++ b/src/compiler/nir/nir_lower_indirect_derefs.c
@@ -141,8 +141,12 @@ lower_indirect_derefs_block(nir_block *block, nir_builder *b,
has_indirect = true;
base = nir_deref_instr_parent(base);
+ if (base == NULL)
+ break;
}
+ if (base == NULL)
+ continue;
if (!has_indirect)
continue;
--
2.17.2
More information about the mesa-dev
mailing list