vkd3d-shader/hlsl: Introduce hlsl_block_add_swizzle().

This commit is contained in:
Elizabeth Figura
2024-12-09 17:11:55 -06:00
committed by Henri Verbeet
parent f8c53fae37
commit 0642531c2a
Notes: Henri Verbeet 2025-03-12 22:21:12 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Francisco Casas (@fcasas)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1413
4 changed files with 35 additions and 87 deletions

View File

@@ -2060,6 +2060,12 @@ struct hlsl_ir_node *hlsl_new_swizzle(struct hlsl_ctx *ctx, uint32_t s, unsigned
return &swizzle->node;
}
struct hlsl_ir_node *hlsl_block_add_swizzle(struct hlsl_ctx *ctx, struct hlsl_block *block, uint32_t s,
unsigned int width, struct hlsl_ir_node *val, const struct vkd3d_shader_location *loc)
{
return append_new_instr(ctx, block, hlsl_new_swizzle(ctx, s, width, val, loc));
}
struct hlsl_ir_node *hlsl_new_matrix_swizzle(struct hlsl_ctx *ctx, struct hlsl_matrix_swizzle s,
unsigned int component_count, struct hlsl_ir_node *val, const struct vkd3d_shader_location *loc)
{