On Thu, 21 Apr 2022 at 17:44, Giovanni Mascellani gmascellani@codeweavers.com wrote:
+static bool add_matrix_load(struct hlsl_ctx *ctx, struct list *instrs,
struct hlsl_ir_node *matrix, struct hlsl_ir_node *index, const struct vkd3d_shader_location *loc)
[...]
- vkd3d_string_buffer_init(&name);
- vkd3d_string_buffer_printf(&name, "<index-%u>", counter++);
- var = hlsl_new_synthetic_var(ctx, name.buffer, ret_type, *loc);
- vkd3d_string_buffer_cleanup(&name);
That works, but it seems preferable to use hlsl_get_string_buffer()/hlsl_release_string_buffer() to get an existing buffer from the cache.