glsl/linker: add DisableTransformFeedbackPacking workaround

Some drivers (e.g. Panfrost) don't support packing of varyings when
used for transform feedback. This new constant ensures that any
varying used for xfb is aligned at the start of a slot and won't be
packed with other varyings.

Scenarios where transform feedback declarations are related to an
array element or a struct member will be handled in a subsequent
patch.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> (Fix order of arguments to varying_matches())
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
This commit is contained in:
Louis-Francis Ratté-Boulianne
2019-10-12 00:05:03 -04:00
committed by Marge Bot
parent 8b361df9cf
commit 00746fa2da
5 changed files with 115 additions and 19 deletions

View File

@@ -766,6 +766,13 @@ public:
*/
unsigned is_unmatched_generic_inout:1;
/**
* Is this varying used by transform feedback?
*
* This is used by the linker to decide if it's safe to pack the varying.
*/
unsigned is_xfb:1;
/**
* Is this varying used only by transform feedback?
*