spirv: Export vtn_storage_class_to_mode()
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 2 May 2019 22:53:22 +0000 (15:53 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 20 May 2019 17:53:38 +0000 (10:53 -0700)
So we can reuse in spirv_to_nir.c.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c

index cfe2893e04f04d99e546dab3386795d05043141f..faaf94a40b1c8a9dfddfced636c7c4d3d67211e3 100644 (file)
@@ -799,6 +799,11 @@ void vtn_handle_entry_point(struct vtn_builder *b, const uint32_t *w,
 void vtn_handle_decoration(struct vtn_builder *b, SpvOp opcode,
                            const uint32_t *w, unsigned count);
 
+enum vtn_variable_mode vtn_storage_class_to_mode(struct vtn_builder *b,
+                                                 SpvStorageClass class,
+                                                 struct vtn_type *interface_type,
+                                                 nir_variable_mode *nir_mode_out);
+
 static inline uint32_t
 vtn_align_u32(uint32_t v, uint32_t a)
 {
index 91f7002734e49b79a36ae5e0de23629d26de37df..1ddac6c4c1c1c066579417b24b8c9f4853033601 100644 (file)
@@ -1716,7 +1716,7 @@ ptr_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
    }
 }
 
-static enum vtn_variable_mode
+enum vtn_variable_mode
 vtn_storage_class_to_mode(struct vtn_builder *b,
                           SpvStorageClass class,
                           struct vtn_type *interface_type,