summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-05-29 12:26:08 -0700
committerRob Clark <[email protected]>2019-05-31 12:58:33 -0700
commit73fb02c5d64665385fe1751ec2f9da41c809a2e1 (patch)
tree769483c30b5e1ef5c83eda0dcc336adfdc30467a
parent8c74772edc62326fb296e62b55d69012cd81cfb0 (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/freedreno/ir3/ir3_legalize.c2
1 files changed, 2 insertions, 0 deletions
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: