Skip to content

glsl: Fix unroll of do{} while(false) like loops

Danylo Piliaiev requested to merge fix/glsl-while-false-unroll into master

For loops which condition is false on the first iteration iteration count was falsely calculated under the assumption that loop's condition is true until it becomes false, meaning it's true at least one time. Now such loops are reported as having 0 iteration.

Similar to the fix e71fc7f2 done in NIR.

Fixes tests/shaders/glsl-fs-loop-while-false-02.shader_test

Merge request reports