summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2018-12-14 15:09:38 +1100
committerEmil Velikov <emil.l.velikov@gmail.com>2019-01-11 19:19:09 +0000
commit418fec283c81462cd29e3a7774035d37cbad6cfe (patch)
treed6f9d5c87e3073c80284b6f4edc60e8d030e3c66
parentefa0c384dca7182301da05b95a44a5157930bb34 (diff)
tgsi/scan: fix loop exit point in tgsi_scan_tess_ctrl()
This just happened not to crash/assert because all loops have at least 1 if-statement and due to a second bug we end up matching the same ENDIF to exit both the iteration over the if-statment and the loop. The second bug is fixed in the following patch. Fixes: 386d165d8d09 ("tgsi/scan: add a new pass that analyzes tess factor writes") Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit dd061eb0442a25cad0cc775103ae31d62280fa44)
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index e13500a7f7b..ecd0b379c2a 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -1147,7 +1147,7 @@ tgsi_scan_tess_ctrl(const struct tgsi_token *tokens,
case TGSI_OPCODE_BGNLOOP:
cond_block_tf_writemask |=
- get_block_tessfactor_writemask(info, &parse, TGSI_OPCODE_ENDIF);
+ get_block_tessfactor_writemask(info, &parse, TGSI_OPCODE_ENDLOOP);
continue;
case TGSI_OPCODE_BARRIER: