summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_private.h
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2018-03-04 19:06:24 +0100
committerKarol Herbst <[email protected]>2019-03-19 04:08:07 +0000
commit659f333b3a4ff92ff985b168728ad37fe3d7e437 (patch)
treeb8d1344245f3b7c9c84bca9f7866668ab48dba67 /src/compiler/spirv/vtn_private.h
parentb98955e128ca3470d89c925f58567f2369f8072a (diff)
glsl: add packed for struct types
We need this for OpenCL kernels because we have to apply C rules for alignment and padding inside structs and for this we also have to know if a struct is packed or not. v2: fix for kernel params Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_private.h')
-rw-r--r--src/compiler/spirv/vtn_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
index bdf326c26f7..20aedc170d9 100644
--- a/src/compiler/spirv/vtn_private.h
+++ b/src/compiler/spirv/vtn_private.h
@@ -335,6 +335,13 @@ struct vtn_type {
* (i.e. a block that contains only builtins).
*/
bool builtin_block:1;
+
+ /* for structs and unions it specifies the minimum alignment of the
+ * members. 0 means packed.
+ *
+ * Set by CPacked and Alignment Decorations in kernels.
+ */
+ bool packed:1;
};
/* Members for pointer types */