summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <[email protected]>2019-10-12 00:05:03 -0400
committerMarge Bot <[email protected]>2020-03-03 12:28:23 +0000
commit00746fa2dab0b55b113e3543420b79f01f91e5c1 (patch)
tree2c1ef09a59f7285360366aff9508ab24b3b8c000 /src/mesa/main
parent8b361df9cf73aae45fff7f766da46d585d903c92 (diff)
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 <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> (Fix order of arguments to varying_matches()) Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 6d18d2f5de5..91fc71cfcfd 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3975,6 +3975,15 @@ struct gl_constants
GLboolean DisableVaryingPacking;
/**
+ * Disable varying packing if used for transform feedback. This is needed
+ * for some drivers (e.g. Panfrost) where transform feedback requires
+ * unpacked varyings.
+ *
+ * This variable is mutually exlusive with DisableVaryingPacking.
+ */
+ GLboolean DisableTransformFeedbackPacking;
+
+ /**
* UBOs and SSBOs can be packed tightly by the OpenGL implementation when
* layout is set as shared (the default) or packed. However most Mesa drivers
* just use STD140 for these layouts. This flag allows drivers to use STD430