freedreno/ir3: add assert
authorRob Clark <robdclark@chromium.org>
Wed, 29 May 2019 19:26:08 +0000 (12:26 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 31 May 2019 19:58:33 +0000 (12:58 -0700)
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 <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/freedreno/ir3/ir3_legalize.c

index e28cac216b5510cccb5817c3a36416ba02f2562a..a5e5fd1fa26a52d0c976baa88ce20d7956b50ad2 100644 (file)
@@ -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: