Skip to content

r300: fix vertex shader control flow in loops

Pavel Ondračka requested to merge ondracka/mesa:r300_vs_cf_fix into main

This fixes 7 loop piglit tests when loop unrolling is disabled.

The problem is that we were trying to be smart with breaks and tried to save one predicate instruction for endif in some cases. This worked for simple loops but brought problems for more complex shaders, instead just switch to standard VE_PRED_SNEQ_PUSH ME_PRED_SET_POP combo everywhere.

Shader-db results on RV530 show three hurt glmark tests, however I believe the simplification should be worth it.

total instructions in shared programs: 123715 -> 123718 (<.01%)
instructions in affected programs: 54 -> 57 (5.56%)
total predicate in shared programs: 118 -> 121 (2.54%)
predicate in affected programs: 6 -> 9 (50.00%)
total temps in shared programs: 17304 -> 17307 (0.02%)
temps in affected programs: 12 -> 15 (25.00%)

Closes: #6468 (closed) Signed-off-by: Pavel Ondračka pavel.ondracka@gmail.com

Edited by Pavel Ondračka

Merge request reports