From bdf2361b87844cd5697aa895bc71b28b0d396c86 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Thu, 2 May 2019 15:53:22 -0700 Subject: [PATCH] spirv: Export vtn_storage_class_to_mode() So we can reuse in spirv_to_nir.c. Reviewed-by: Jason Ekstrand Reviewed-by: Bas Nieuwenhuizen --- src/compiler/spirv/vtn_private.h | 5 +++++ src/compiler/spirv/vtn_variables.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index cfe2893e04f..faaf94a40b1 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -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) { diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 91f7002734e..1ddac6c4c1c 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -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, -- 2.30.2