i965: Fix component mask and varying_to_slot mapping for gl_ViewportIndex
authorAnuj Phogat <anuj.phogat@gmail.com>
Fri, 11 Apr 2014 17:56:50 +0000 (10:56 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 17 Apr 2014 17:08:28 +0000 (10:08 -0700)
commit48fc2703e5d1c0a022a35fd77475d31d17c09177
tree30666b39f876fa25d07deb7891dea582570af105
parent7928b9c249b2059c926d58a30f9f38bceafefb77
i965: Fix component mask and varying_to_slot mapping for gl_ViewportIndex

gl_ViewportIndex doesn't get its own varying slot. It is stored
in VARYING_SLOT_PSIZ.z. This patch fixes the issue for both gen7
and gen8 because gen7_upload_3dstate_so_decl_list() is shared
between them.

Fixes failures in OpenGL Khronos CTS test transform_feedback_builtins.
Makes new piglit test glsl-1.50-transform-feedback-builtins pass for
'gl_ViewportIndex'.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen7_sol_state.c