i965/gs: Optimize away the EOT write on Gen8+ with static vertex count.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 25 Sep 2015 15:21:57 +0000 (08:21 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 26 Sep 2015 19:02:34 +0000 (12:02 -0700)
commitd6a41b5f70b9071cca8959afab66a6504e7cb7ce
tree5d38ec04c31e33f5fee78debb404a4a7ab150c54
parent08fe5799e61e9251dec163d000709ff33434216d
i965/gs: Optimize away the EOT write on Gen8+ with static vertex count.

With static vertex counts, the final EOT write doesn't actually write
any data - it's just there to end the thread.  Typically, the last
thing before ending the thread will be an EmitVertex() call, resulting
in a URB write.  We can just set EOT on that.

Note that this isn't always possible - there might be an intervening
SSBO write/image store, or the URB write may have been in a loop.

shader-db statistics for geometry shaders only:

total instructions in shared programs: 3173 -> 3149 (-0.76%)
instructions in affected programs:     176 -> 152 (-13.64%)
helped:                                8

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp