virgl: Enable passing arrays as input to fragment shaders

Graphics / Mesa 3D Graphics Library / Mesa - Gert Wollny [collabora.com] - 10 April 2019 09:09 EDT

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

04e672257c7 virgl: Enable passing arrays as input to fragment shaders
src/gallium/drivers/virgl/virgl_hw.h | 2 +
src/gallium/drivers/virgl/virgl_screen.c | 5 +++
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 64 ++++++++++++++++++++++++++----
3 files changed, 64 insertions(+), 7 deletions(-)

Upstream: cgit.freedesktop.org


  • Share