spirv: Rename push_value_pointer to push_pointer

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>
This commit is contained in:
Jason Ekstrand
2020-05-27 17:55:10 -05:00
parent ac1e6d5a46
commit aaf1f34215
4 changed files with 13 additions and 13 deletions

View File

@@ -2291,10 +2291,10 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
} else if (opcode == SpvOpImage) { } else if (opcode == SpvOpImage) {
struct vtn_value *src_val = vtn_untyped_value(b, w[3]); struct vtn_value *src_val = vtn_untyped_value(b, w[3]);
if (src_val->value_type == vtn_value_type_sampled_image) { 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 { } else {
vtn_assert(src_val->value_type == vtn_value_type_pointer); 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; return;
} }

View File

@@ -342,11 +342,11 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode,
type->type != NULL) { type->type != NULL) {
/* This is a pointer with an actual storage type */ /* This is a pointer with an actual storage type */
nir_ssa_def *ssa_ptr = nir_load_param(&b->nb, b->func_param_idx++); 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 || } else if (type->base_type == vtn_base_type_pointer ||
type->base_type == vtn_base_type_image || type->base_type == vtn_base_type_image ||
type->base_type == vtn_base_type_sampler) { 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 { } else {
/* We're a regular SSA value. */ /* We're a regular SSA value. */
struct vtn_ssa_value *value = vtn_create_ssa_value(b, type->type); struct vtn_ssa_value *value = vtn_create_ssa_value(b, type->type);

View 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 /* 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. * decorations is handled by common code.
*/ */
static inline struct vtn_value * static inline struct vtn_value *
@@ -785,7 +785,7 @@ 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_ssa_value *vtn_ssa_value(struct vtn_builder *b, uint32_t value_id);
struct vtn_value *vtn_push_value_pointer(struct vtn_builder *b, struct vtn_value *vtn_push_pointer(struct vtn_builder *b,
uint32_t value_id, uint32_t value_id,
struct vtn_pointer *ptr); struct vtn_pointer *ptr);

View File

@@ -68,7 +68,7 @@ vtn_decorate_pointer(struct vtn_builder *b, struct vtn_value *val,
} }
struct vtn_value * struct vtn_value *
vtn_push_value_pointer(struct vtn_builder *b, uint32_t value_id, vtn_push_pointer(struct vtn_builder *b, uint32_t value_id,
struct vtn_pointer *ptr) struct vtn_pointer *ptr)
{ {
struct vtn_value *val = vtn_push_value(b, value_id, vtn_value_type_pointer); struct vtn_value *val = vtn_push_value(b, value_id, vtn_value_type_pointer);
@@ -82,7 +82,7 @@ vtn_push_ssa(struct vtn_builder *b, uint32_t value_id,
{ {
struct vtn_value *val; struct vtn_value *val;
if (type->base_type == vtn_base_type_pointer) { 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 { } else {
val = vtn_push_value(b, value_id, vtn_value_type_ssa); val = vtn_push_value(b, value_id, vtn_value_type_ssa);
val->ssa = 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); vtn_pointer_dereference(b, base_val->pointer, chain);
ptr->ptr_type = ptr_type; ptr->ptr_type = ptr_type;
ptr->access |= access; ptr->access |= access;
vtn_push_value_pointer(b, w[2], ptr); vtn_push_pointer(b, w[2], ptr);
} }
break; break;
} }
@@ -2594,7 +2594,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
if (res_type->base_type == vtn_base_type_image || if (res_type->base_type == vtn_base_type_image ||
res_type->base_type == vtn_base_type_sampler) { res_type->base_type == vtn_base_type_sampler) {
vtn_push_value_pointer(b, w[2], src); vtn_push_pointer(b, w[2], src);
return; return;
} else if (res_type->base_type == vtn_base_type_sampled_image) { } else if (res_type->base_type == vtn_base_type_sampled_image) {
struct vtn_value *val = struct vtn_value *val =