]> git.tdb.fi Git - libs/gl.git/commit
Recognize backwards dependencies in GLSL loops
authorMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 10:38:08 +0000 (13:38 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 10:49:36 +0000 (13:49 +0300)
commit83186c4a01ada8bfb0199c4396c0aaa64631577f
treef1ef3bc1ca741ade68c5b0a8982b7be4f95b28c2
parentbb386d895f5fce2f0099886fdf7e7073b18246e8
Recognize backwards dependencies in GLSL loops

Assignments at the end of a loop may get used by references earlier in
the same loop and should not be removed.

The added testcase also triggers some other bugs which will be fixed
over the next few commits.
source/glsl/optimize.cpp
source/glsl/optimize.h
tests/glsl/unused_variable_removal_iteration.glsl [new file with mode: 0644]