mesa/st/glsl_to_tgsi: Mark first write as unconditional when appropriate
authorGert Wollny <gw.fossdev@gmail.com>
Mon, 29 Jan 2018 12:24:00 +0000 (05:24 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 30 Jan 2018 04:04:49 +0000 (21:04 -0700)
commit6a7d1ca2c49ae06bbb323936f1e1c17ba7e2c9a1
treefac553d59453a80e8408ad85281af5c0a82bde7b
parent3c7aa242f5df6ba45acc7338bad088910e4b7330
mesa/st/glsl_to_tgsi: Mark first write as unconditional when appropriate

In the register lifetime estimation if the first write is unconditional or
conditional but not within a loop then this is an unconditional dominant
write in the sense of register life time estimation.
Add a test case and record the write accordingly.

Fixes: 807e2539e512ca6c96f059da855473eb7be99ba1 ("mesa/st/glsl_to_tgsi: Add
tracking of ifelse writes in register merging")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104803
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
src/mesa/state_tracker/tests/test_glsl_to_tgsi_lifetime.cpp