spirv: Rename push_value_pointer to push_pointer
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 27 May 2020 22:55:10 +0000 (17:55 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 24 Jul 2020 03:43:21 +0000 (22:43 -0500)
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_cfg.c
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c

index 8a83f7f485947a58a205b93ea25ba50b2bb0d499..308102f4bf05a93b5e0916da6127c96a6866d53f 100644 (file)
@@ -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;
    }
index cbdd6af2338fe275436c0b0be8d5778d1c8520a9..23a0983e4f4ba4d558fff72d9fc4e56e01fdef45 100644 (file)
@@ -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);
index b8163eac24a0a16fbbfd2f95c20e3fe56eb25f51..9d9e7883481a3df4dacf7cc4a12f1cdf31aaf2cb 100644 (file)
@@ -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);
index f453834208c20d1140d28a958ff75215bb288f1e..fb3eef7de717de8dca8ece9d389e0eaded2992ef 100644 (file)
@@ -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 =