diff options
author | Paul Berry <[email protected]> | 2011-07-01 17:29:35 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-07-08 09:59:30 -0700 |
commit | 067c9d7bd776260298ceabda026425ed7e4eb161 (patch) | |
tree | a119596fb68b44926f8c6a299ab3e9d9b74de678 /src/glx/glxext.c | |
parent | e71b4ab8a64bf978b2036976a41e30996eebb0c8 (diff) |
glsl: Lower break instructions when necessary at the end of a loop.
Normally lower_jumps.cpp doesn't need to lower a break instruction
that occurs at the end of a loop, because all back-ends can produce
proper GPU instructions for a break instruction in this "canonical"
location. However, if other break instructions within the loop are
already being lowered, then a break instruction at the end of the loop
needs to be lowered too, since after the optimization is complete a
new conditional break will be inserted at the end of the loop.
Without this patch, lower_jumps.cpp may require multiple passes in
order to lower all jumps. This results in sub-optimal output because
lower_jumps.cpp produces a brand new set of temporary variables each
time it is run, and the redundant temporary variables are not
guaranteed to be eliminated by later optimization passes.
Fixes unit test test_lower_breaks_6.
Diffstat (limited to 'src/glx/glxext.c')
0 files changed, 0 insertions, 0 deletions