virgl: Enable passing arrays as input to fragment shaders
authorGert Wollny <gert.wollny@collabora.com>
Tue, 15 Jan 2019 09:32:17 +0000 (10:32 +0100)
committerGert Wollny <gert.wollny@collabora.com>
Wed, 10 Apr 2019 09:09:40 +0000 (11:09 +0200)
commit04e672257c770412dd04011929662ee969e24106
treef5cbba8a9dd50df82c594584adb8787af939e243
parent872519c663ca813b87c8e2cd1c2ee90eb086e17c
virgl: Enable passing arrays as input to fragment shaders

This is needed to properly handle interpolateAt* when the input to be
interpolated is passed as array in the original GLSL.

Currently, the the GLSL compiler would lower selecting the correct input so
that the interpolant parameter to interpolateAt* is a temporary, and this
can not be used to create a valid shader on the host side, because here the
parameter must a shader input.

By allowing the passing the created TGSI allows to create proper GLSL.
This is related to the virglrenderer bug
  https://gitlab.freedesktop.org/virgl/virglrenderer/issues/74

v2: Squash the two patches handling these flags into another

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/drivers/virgl/virgl_hw.h
src/gallium/drivers/virgl/virgl_screen.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp