glsl: disable vec3 packing/splitting in tfb separate mode
authorBrian Paul <brianp@vmware.com>
Mon, 18 Dec 2017 19:32:56 +0000 (12:32 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 20 Dec 2017 18:23:17 +0000 (11:23 -0700)
commit6e5b882339e9128348f0e7b828230f07338fce55
treedc13d68909d76b140d67ace8a6ab29ce24923bb5
parent462df6449523ffbc144641fd8525e55d193ece37
glsl: disable vec3 packing/splitting in tfb separate mode

This fixes a varying packing issue when using transform feedback in
GL_SEPARATE_ATTRIBS mode.  By time we get to linking, we already
know that the number of feedback attributes is under the
GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS limit so packing isn't
as critical.  In fact, packing/splitting vec3 attributes can cause
trouble because splitting effectively creates another TFB output
which can exceed device limits.  So, disable vec3 packing when it's
not needed to avoid that issue.

Fixes the Piglit ext_transform_feedback-separate test on VMware
driver.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/link_varyings.cpp