[Mesa-dev] [PATCH 01/11] nir: Validate that a block doesn't have two identical successors.
Kenneth Graunke
kenneth at whitecape.org
Tue Sep 22 20:01:16 PDT 2015
This is invalid, and causes disasters if we try to unlink successors:
removing the first will work, but removing the second copy will fail
because the block isn't in the successor's predecessor set any longer.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>
---
src/glsl/nir/nir_validate.c | 1 +
1 file changed, 1 insertion(+)
***UNCHANGED SINCE THE FIRST SEND***
I want to commit all the NIR control flow fixes together, as I haven't
tested individual commits - only that the whole group collectively works
and fixes bugs.
diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c
index 9938c0e..1c9993a 100644
--- a/src/glsl/nir/nir_validate.c
+++ b/src/glsl/nir/nir_validate.c
@@ -586,6 +586,7 @@ validate_block(nir_block *block, validate_state *state)
}
assert(block->successors[0] != NULL);
+ assert(block->successors[0] != block->successors[1]);
for (unsigned i = 0; i < 2; i++) {
if (block->successors[i] != NULL) {
--
2.5.3
More information about the mesa-dev
mailing list