diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-03-21 13:26:48 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-03-23 10:22:39 -0700 |
commit | 9d0ae777dd68dad682dcc7768726996639ae2684 (patch) | |
tree | 16a457991e72da2c4d77985a0038920a71dce40f /src/compiler/spirv/vtn_variables.c | |
parent | fb024f5e72014efea5007684c7e61cd31a2cd9c8 (diff) |
spirv: Use interface type for block and buffer block
Also handle GLSL_TYPE_INTERFACE the same way we do GLSL_TYPE_STRUCT in
various places. Motivated by ARB_gl_spirv work, that will take
advantage of the interface types when handling NIR coming from SPIR-V.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 782ad08d321..b121a2c2988 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -490,6 +490,7 @@ vtn_ssa_offset_pointer_dereference(struct vtn_builder *b, break; } + case GLSL_TYPE_INTERFACE: case GLSL_TYPE_STRUCT: { vtn_assert(deref_chain->link[idx].mode == vtn_access_mode_literal); unsigned member = deref_chain->link[idx].id; @@ -934,6 +935,7 @@ _vtn_block_load_store(struct vtn_builder *b, nir_intrinsic_op op, bool load, return; } + case GLSL_TYPE_INTERFACE: case GLSL_TYPE_STRUCT: { unsigned elems = glsl_get_length(type->type); for (unsigned i = 0; i < elems; i++) { @@ -1058,6 +1060,7 @@ _vtn_variable_load_store(struct vtn_builder *b, bool load, } /* Fall through */ + case GLSL_TYPE_INTERFACE: case GLSL_TYPE_ARRAY: case GLSL_TYPE_STRUCT: { unsigned elems = glsl_get_length(ptr->type->type); @@ -1140,6 +1143,7 @@ _vtn_variable_copy(struct vtn_builder *b, struct vtn_pointer *dest, vtn_variable_store(b, vtn_variable_load(b, src), dest); return; + case GLSL_TYPE_INTERFACE: case GLSL_TYPE_ARRAY: case GLSL_TYPE_STRUCT: { struct vtn_access_chain chain = { |