Zebediah Figura : vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_load_component().
Module: vkd3d Branch: master Commit: 39a03cfd22df4e90e3b620984378e934c9fc5689 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/39a03cfd22df4e90e3b620984378e9... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Nov 10 20:19:39 2022 -0600 vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_load_component(). --- libs/vkd3d-shader/hlsl.c | 4 ++-- libs/vkd3d-shader/hlsl.h | 2 +- libs/vkd3d-shader/hlsl.y | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 04630db7..32511590 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -1263,7 +1263,7 @@ struct hlsl_ir_load *hlsl_new_var_load(struct hlsl_ctx *ctx, struct hlsl_ir_var return hlsl_new_load_index(ctx, &var_deref, NULL, loc); } -struct hlsl_ir_load *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, +struct hlsl_ir_node *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, const struct hlsl_deref *deref, unsigned int comp, const struct vkd3d_shader_location *loc) { struct hlsl_type *type, *comp_type; @@ -1288,7 +1288,7 @@ struct hlsl_ir_load *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_b hlsl_block_add_instr(block, &load->node); - return load; + return &load->node; } struct hlsl_ir_resource_load *hlsl_new_resource_load(struct hlsl_ctx *ctx, diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index a06674e2..7de5e2eb 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -1079,7 +1079,7 @@ struct hlsl_ir_load *hlsl_new_var_load(struct hlsl_ctx *ctx, struct hlsl_ir_var const struct vkd3d_shader_location *loc); struct hlsl_ir_load *hlsl_new_load_index(struct hlsl_ctx *ctx, const struct hlsl_deref *deref, struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc); -struct hlsl_ir_load *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, +struct hlsl_ir_node *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, const struct hlsl_deref *deref, unsigned int comp, const struct vkd3d_shader_location *loc); struct hlsl_ir_store *hlsl_new_simple_store(struct hlsl_ctx *ctx, struct hlsl_ir_var *lhs, struct hlsl_ir_node *rhs); diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 86f0f565..2a8e3160 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -628,7 +628,7 @@ static struct hlsl_ir_node *add_load_component(struct hlsl_ctx *ctx, struct list { const struct hlsl_deref *src; struct hlsl_ir_store *store; - struct hlsl_ir_load *load; + struct hlsl_ir_node *load; struct hlsl_block block; struct hlsl_ir_var *var; @@ -645,7 +645,7 @@ static struct hlsl_ir_node *add_load_component(struct hlsl_ctx *ctx, struct list return NULL; list_move_tail(instrs, &block.instrs); - return &load->node; + return load; } static bool add_record_access(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_node *record,
participants (1)
-
Alexandre Julliard