summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl_types.h
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2015-12-30 13:31:24 +1100
committerTimothy Arceri <timothy.arceri@collabora.com>2016-03-05 19:38:34 +1100
commit9f24f42c491221a79641a0d810f9c78393d81e5c (patch)
tree82e74776fa31f1431aadf3b79cbff58067d8682e /src/compiler/glsl_types.h
parent8abed7f185329250adf9f8c90a131797feda83b6 (diff)
downloadexternal_mesa3d-9f24f42c491221a79641a0d810f9c78393d81e5c.zip
external_mesa3d-9f24f42c491221a79641a0d810f9c78393d81e5c.tar.gz
external_mesa3d-9f24f42c491221a79641a0d810f9c78393d81e5c.tar.bz2
glsl: add offset to glsl interface type
In this patch we also copy the offset value from the ast and implement offset linking rules by adding it to the record_compare() function. From Section 4.4.5 (Uniform and Shader Storage Block Layout Qualifiers) of the GLSL 4.50 spec: "Two blocks linked together in the same program with the same block name must have the exact same set of members qualified with offset and their integral-constant-expression values must be the same, or a link-time error results." Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
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 2f612d8..b0e6f3f 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -838,6 +838,14 @@ struct glsl_struct_field {
int location;
/**
+ * For interface blocks, members may have an explicit byte offset
+ * specified; -1 otherwise.
+ *
+ * Ignored for structs.
+ */
+ int offset;
+
+ /**
* For interface blocks, the interpolation mode (as in
* ir_variable::interpolation). 0 otherwise.
*/