tgsi/scan: correctly walk instructions in tgsi_scan_tess_ctrl()
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 14 Dec 2018 04:36:02 +0000 (15:36 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 1 Jan 2019 22:53:01 +0000 (09:53 +1100)
commit4dda4457504ee5cafa0388543620d4598b8561cf
tree1b451ca3eaa1d5c1f1340e8d5a464c136ccee8fd
parentdd061eb0442a25cad0cc775103ae31d62280fa44
tgsi/scan: correctly walk instructions in tgsi_scan_tess_ctrl()

The previous code used a do while loop and continues after walking
a nested loop/if-statement. This means we end up evaluating the
last instruction from the nested block against the while condition
and potentially exit early if it matches the exit condition of the
outer block.

Fixes: 386d165d8d09 ("tgsi/scan: add a new pass that analyzes tess factor writes")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/tgsi/tgsi_scan.c