i965: Fix scalar vertex shader struct outputs.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 25 Nov 2015 05:33:01 +0000 (21:33 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 25 Nov 2015 19:47:47 +0000 (11:47 -0800)
commit3810c1561401aba336765d64d1a5a3e44eb58eb3
tree33b84bec906f0281c9e1f7732835c40fc120ecc5
parent3e9003e9cf55265ab1fb6522dc5cbb2f455ea1f9
i965: Fix scalar vertex shader struct outputs.

While we correctly set output[] for composite varyings, we set completely
bogus values for output_components[], making emit_urb_writes() output
zeros instead of the actual values.

Unfortunately, our simple approach goes out the window, and we need to
recurse into structs to get the proper value of vector_elements for each
field.

Together with the previous patch, this fixes rendering in an upcoming
game from Feral Interactive.

v2: Use pointers instead of pass-by-mutable-reference (Jason, Matt).

Cc: "11.1 11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp