i965: Fix last slot calculations
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 14 Dec 2016 11:29:29 +0000 (03:29 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 5 Jan 2017 09:54:52 +0000 (01:54 -0800)
commit480d6c1653713dcae617ac523b2ca5deee01c845
tree050a22bc656fbff0720d9dba1ea36e10fb4c91ca
parent8dc92a56134580dc47e48a046aff347776aaac34
i965: Fix last slot calculations

If the VUE map has slots at the end which the shader does not write,
then we'd "flush" (constructing an URB write) on the last output it
actually wrote.  Then, we'd construct another SEND with EOT, but with
no actual payload data.  That's not legal.

For example, SSO programs have clip distance slots allocated no matter
what, but the shader may not write them.  If it doesn't write any user
defined varyings, then the clip distance slots will be the last ones.

Found while debugging
dEQP-VK.tessellation.shader_input_output.gl_position_vs_to_tcs_to_tes

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp