From 7ee0216e2d576a02de9d938488a6d6ba55ccb115 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 23 Apr 2015 17:10:42 -0700 Subject: [PATCH] nir/validate: Validate SSA def parent instructions Reviewed-by: Connor Abbott --- src/glsl/nir/nir_validate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c index a7aa79837da..35a853d1484 100644 --- a/src/glsl/nir/nir_validate.c +++ b/src/glsl/nir/nir_validate.c @@ -236,6 +236,8 @@ validate_ssa_def(nir_ssa_def *def, validate_state *state) assert(!BITSET_TEST(state->ssa_defs_found, def->index)); BITSET_SET(state->ssa_defs_found, def->index); + assert(def->parent_instr == state->instr); + assert(def->num_components <= 4); ssa_def_validate_state *def_state = ralloc(state->ssa_defs, -- 2.30.2