From: Rob Clark Date: Wed, 29 May 2019 19:26:08 +0000 (-0700) Subject: freedreno/ir3: add assert X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73fb02c5d64665385fe1751ec2f9da41c809a2e1;p=mesa.git 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 --- 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: