[Mesa-dev] [PATCH 1/2] glsl: mark packed varyings during lower_packed_varyings
Tapani Pälli
tapani.palli at intel.com
Mon Oct 5 00:14:46 PDT 2015
This makes it easier and faster to identify a packed varying in
shader queries.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
src/glsl/ir.h | 5 +++++
src/glsl/lower_packed_varyings.cpp | 2 ++
2 files changed, 7 insertions(+)
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 43a2bf0..d33d67e 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -791,6 +791,11 @@ public:
*/
unsigned from_ssbo_unsized_array:1; /**< unsized array buffer variable. */
+ /** If set, variable is packed along with other variables in a
+ * single varying slot.
+ */
+ unsigned is_packed_varying:1;
+
/**
* Emit a warning if this variable is accessed.
*/
diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp
index 5d66ca9..79b6d0e 100644
--- a/src/glsl/lower_packed_varyings.cpp
+++ b/src/glsl/lower_packed_varyings.cpp
@@ -278,6 +278,8 @@ lower_packed_varyings_visitor::run(struct gl_shader *shader)
if (!shader->packed_varyings)
shader->packed_varyings = new (shader) exec_list;
+ var->data.is_packed_varying = 1;
+
shader->packed_varyings->push_tail(var->clone(shader, NULL));
/* Change the old varying into an ordinary global. */
--
2.4.3
More information about the mesa-dev
mailing list