aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-28 16:31:06 -0700
committerJason Ekstrand <[email protected]>2017-07-18 09:43:12 -0700
commit868456fbf7418f318ea965c2ce151781dbe42e67 (patch)
tree96218afddf1be634b0dfddb69a2eee855ca1b00a /src/compiler/spirv/vtn_private.h
parenta96888923758475e1396a21bf70f9fc3390e76ec (diff)
nir/spirv: Implement OpPtrAccessChain for buffers
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_private.h')
-rw-r--r--src/compiler/spirv/vtn_private.h11
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