From: Francisco Casas <fcasas(a)codeweavers.com> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com> --- We agreed to call these "elements", and this function is used in following patches, so I think it is better to change it now. v2: - New in v2. --- libs/vkd3d-shader/hlsl.c | 6 +++--- libs/vkd3d-shader/hlsl.h | 2 +- libs/vkd3d-shader/hlsl_codegen.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index a47e3d2d..01709c8c 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -370,7 +370,7 @@ static struct hlsl_type *get_type_from_deref(struct hlsl_ctx *ctx, const struct type = deref->var->data_type; for (i = 0; i < deref->path_len; ++i) - type = hlsl_get_inner_type_from_path_index(ctx, type, deref->path[i].node); + type = hlsl_get_element_type_from_path_index(ctx, type, deref->path[i].node); return type; } @@ -423,7 +423,7 @@ static bool init_deref_from_component_index(struct hlsl_ctx *ctx, struct hlsl_bl return true; } -struct hlsl_type *hlsl_get_inner_type_from_path_index(struct hlsl_ctx *ctx, const struct hlsl_type *type, +struct hlsl_type *hlsl_get_element_type_from_path_index(struct hlsl_ctx *ctx, const struct hlsl_type *type, struct hlsl_ir_node *idx) { assert(idx); @@ -963,7 +963,7 @@ struct hlsl_ir_load *hlsl_new_load_index(struct hlsl_ctx *ctx, const struct hlsl type = get_type_from_deref(ctx, deref); if (idx) - type = hlsl_get_inner_type_from_path_index(ctx, type, idx); + type = hlsl_get_element_type_from_path_index(ctx, type, idx); if (!(load = hlsl_alloc(ctx, sizeof(*load)))) return NULL; diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 7970665c..96466ee1 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -735,7 +735,7 @@ struct hlsl_ir_function_decl *hlsl_get_func_decl(struct hlsl_ctx *ctx, const cha struct hlsl_type *hlsl_get_type(struct hlsl_scope *scope, const char *name, bool recursive); struct hlsl_ir_var *hlsl_get_var(struct hlsl_scope *scope, const char *name); -struct hlsl_type *hlsl_get_inner_type_from_path_index(struct hlsl_ctx *ctx, const struct hlsl_type *type, +struct hlsl_type *hlsl_get_element_type_from_path_index(struct hlsl_ctx *ctx, const struct hlsl_type *type, struct hlsl_ir_node *idx); struct hlsl_type *hlsl_new_array_type(struct hlsl_ctx *ctx, struct hlsl_type *basic_type, unsigned int array_size); diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 36a417e5..cae663cf 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -116,7 +116,7 @@ static struct hlsl_ir_node *new_offset_instr_from_deref(struct hlsl_ctx *ctx, st list_move_tail(&block->instrs, &idx_block.instrs); - type = hlsl_get_inner_type_from_path_index(ctx, type, deref->path[i].node); + type = hlsl_get_element_type_from_path_index(ctx, type, deref->path[i].node); } return offset; -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/7