diff options
Diffstat (limited to 'src/compiler/spirv/vtn_private.h')
-rw-r--r-- | src/compiler/spirv/vtn_private.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index 7cb503568fe..2f96c0904ac 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -220,15 +220,15 @@ struct vtn_type { /* Specifies the length of complex types. */ unsigned length; + /* for arrays, matrices and pointers, the array stride */ + unsigned stride; + union { /* Members for scalar, vector, and array-like types */ struct { /* for arrays, the vtn_type for the elements of the array */ struct vtn_type *array_element; - /* for arrays and matrices, the array stride */ - unsigned stride; - /* for matrices, whether the matrix is stored row-major */ bool row_major:1; @@ -308,6 +308,11 @@ struct vtn_access_link { struct vtn_access_chain { uint32_t length; + /** Whether or not to treat the base pointer as an array. This is only + * true if this access chain came from an OpPtrAccessChain. + */ + bool ptr_as_array; + /** Struct elements and array offsets. * * This is an array of 1 so that it can conveniently be created on the |