summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl_types.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-05-11 10:49:19 +1000
committerDave Airlie <airlied@redhat.com>2016-06-06 15:58:37 +1000
commit78659ade404a0761968ab5240c812e4c3119d669 (patch)
tree1c290cc2d1460ace7d44c602cf2891561d4e410e /src/compiler/glsl_types.h
parentff2e569153d48bda347be729fc441852ab293138 (diff)
downloadexternal_mesa3d-78659ade404a0761968ab5240c812e4c3119d669.zip
external_mesa3d-78659ade404a0761968ab5240c812e4c3119d669.tar.gz
external_mesa3d-78659ade404a0761968ab5240c812e4c3119d669.tar.bz2
glsl: use enum glsl_interface_packing in more places. (v2)
Although the glsl_types.h stores this in a bitfield, we should hide that from everyone else. Hide the cast in an accessor method and use the enum everywhere. This makes things a bit nicer in gdb, and improves type safety. v2: fix a few pieces of interface I missed that caused some piglit regressions. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/compiler/glsl_types.h')
-rw-r--r--src/compiler/glsl_types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h
index f9a377d..4e3afe7 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -745,6 +745,14 @@ struct glsl_type {
*/
bool record_compare(const glsl_type *b, bool match_locations = true) const;
+ /**
+ * Get the type interface packing.
+ */
+ enum glsl_interface_packing get_interface_packing() const
+ {
+ return (enum glsl_interface_packing)interface_packing;
+ }
+
private:
static mtx_t mutex;