From: Jason Ekstrand Date: Wed, 27 May 2020 22:55:10 +0000 (-0500) Subject: spirv: Rename push_value_pointer to push_pointer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aaf1f342152707975cab4accfd91af1c12aafab1;p=mesa.git spirv: Rename push_value_pointer to push_pointer Reviewed-by: Caio Marcelo de Oliveira Filho Part-of: --- diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 8a83f7f4859..308102f4bf0 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2291,10 +2291,10 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode, } else if (opcode == SpvOpImage) { struct vtn_value *src_val = vtn_untyped_value(b, w[3]); if (src_val->value_type == vtn_value_type_sampled_image) { - vtn_push_value_pointer(b, w[2], src_val->sampled_image->image); + vtn_push_pointer(b, w[2], src_val->sampled_image->image); } else { vtn_assert(src_val->value_type == vtn_value_type_pointer); - vtn_push_value_pointer(b, w[2], src_val->pointer); + vtn_push_pointer(b, w[2], src_val->pointer); } return; } diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index cbdd6af2338..23a0983e4f4 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spirv/vtn_cfg.c @@ -342,11 +342,11 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode, type->type != NULL) { /* This is a pointer with an actual storage type */ nir_ssa_def *ssa_ptr = nir_load_param(&b->nb, b->func_param_idx++); - vtn_push_value_pointer(b, w[2], vtn_pointer_from_ssa(b, ssa_ptr, type)); + vtn_push_pointer(b, w[2], vtn_pointer_from_ssa(b, ssa_ptr, type)); } else if (type->base_type == vtn_base_type_pointer || type->base_type == vtn_base_type_image || type->base_type == vtn_base_type_sampler) { - vtn_push_value_pointer(b, w[2], vtn_load_param_pointer(b, type, b->func_param_idx++)); + vtn_push_pointer(b, w[2], vtn_load_param_pointer(b, type, b->func_param_idx++)); } else { /* We're a regular SSA value. */ struct vtn_ssa_value *value = vtn_create_ssa_value(b, type->type); diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index b8163eac24a..9d9e7883481 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -701,7 +701,7 @@ vtn_untyped_value(struct vtn_builder *b, uint32_t value_id) } /* Consider not using this function directly and instead use - * vtn_push_ssa/vtn_push_value_pointer so that appropriate applying of + * vtn_push_ssa/vtn_push_pointer so that appropriate applying of * decorations is handled by common code. */ static inline struct vtn_value * @@ -785,9 +785,9 @@ vtn_get_type(struct vtn_builder *b, uint32_t value_id) struct vtn_ssa_value *vtn_ssa_value(struct vtn_builder *b, uint32_t value_id); -struct vtn_value *vtn_push_value_pointer(struct vtn_builder *b, - uint32_t value_id, - struct vtn_pointer *ptr); +struct vtn_value *vtn_push_pointer(struct vtn_builder *b, + uint32_t value_id, + struct vtn_pointer *ptr); struct vtn_value *vtn_push_ssa(struct vtn_builder *b, uint32_t value_id, struct vtn_type *type, struct vtn_ssa_value *ssa); diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index f453834208c..fb3eef7de71 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -68,8 +68,8 @@ vtn_decorate_pointer(struct vtn_builder *b, struct vtn_value *val, } struct vtn_value * -vtn_push_value_pointer(struct vtn_builder *b, uint32_t value_id, - struct vtn_pointer *ptr) +vtn_push_pointer(struct vtn_builder *b, uint32_t value_id, + struct vtn_pointer *ptr) { struct vtn_value *val = vtn_push_value(b, value_id, vtn_value_type_pointer); val->pointer = vtn_decorate_pointer(b, val, ptr); @@ -82,7 +82,7 @@ vtn_push_ssa(struct vtn_builder *b, uint32_t value_id, { struct vtn_value *val; if (type->base_type == vtn_base_type_pointer) { - val = vtn_push_value_pointer(b, value_id, vtn_pointer_from_ssa(b, ssa->def, type)); + val = vtn_push_pointer(b, value_id, vtn_pointer_from_ssa(b, ssa->def, type)); } else { val = vtn_push_value(b, value_id, vtn_value_type_ssa); val->ssa = ssa; @@ -2570,7 +2570,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, vtn_pointer_dereference(b, base_val->pointer, chain); ptr->ptr_type = ptr_type; ptr->access |= access; - vtn_push_value_pointer(b, w[2], ptr); + vtn_push_pointer(b, w[2], ptr); } break; } @@ -2594,7 +2594,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, if (res_type->base_type == vtn_base_type_image || res_type->base_type == vtn_base_type_sampler) { - vtn_push_value_pointer(b, w[2], src); + vtn_push_pointer(b, w[2], src); return; } else if (res_type->base_type == vtn_base_type_sampled_image) { struct vtn_value *val =