vkd3d-shader/hlsl: Add a hlsl_block_add_load_index() helper.

This commit is contained in:
Elizabeth Figura
2024-12-09 14:00:54 -06:00
committed by Henri Verbeet
parent 7b486fe239
commit d52df527ba
Notes: Henri Verbeet 2025-03-05 14:16:50 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Francisco Casas (@fcasas)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1401
3 changed files with 20 additions and 27 deletions

View File

@@ -1847,6 +1847,14 @@ struct hlsl_ir_load *hlsl_new_load_index(struct hlsl_ctx *ctx, const struct hlsl
return load;
}
struct hlsl_ir_node *hlsl_block_add_load_index(struct hlsl_ctx *ctx, struct hlsl_block *block,
const struct hlsl_deref *deref, struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc)
{
struct hlsl_ir_load *load = hlsl_new_load_index(ctx, deref, idx, loc);
return append_new_instr(ctx, block, load ? &load->node : NULL);
}
struct hlsl_ir_load *hlsl_new_load_parent(struct hlsl_ctx *ctx, const struct hlsl_deref *deref,
const struct vkd3d_shader_location *loc)
{