From 73fb02c5d64665385fe1751ec2f9da41c809a2e1 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 29 May 2019 12:26:08 -0700 Subject: [PATCH] freedreno/ir3: add assert The special handling for last_input assumes that all the varying loads are in the first block. Add an assert to catch if anyone breaks that assumption. Signed-off-by: Rob Clark Reviewed-by: Eric Anholt --- src/freedreno/ir3/ir3_legalize.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/freedreno/ir3/ir3_legalize.c b/src/freedreno/ir3/ir3_legalize.c index e28cac216b5..a5e5fd1fa26 100644 --- a/src/freedreno/ir3/ir3_legalize.c +++ b/src/freedreno/ir3/ir3_legalize.c @@ -278,6 +278,8 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block) } if (last_input) { + assert(block == list_first_entry(&block->shader->block_list, + struct ir3_block, node)); /* special hack.. if using ldlv to bypass interpolation, * we need to insert a dummy bary.f on which we can set * the (ei) flag: -- 2.30.2