[PATCH vkd3d v2 8/9] vkd3d-shader/hlsl: Support matrix indexing.

Henri Verbeet hverbeet at gmail.com
Fri Apr 22 02:01:20 CDT 2022


On Thu, 21 Apr 2022 at 17:44, Giovanni Mascellani
<gmascellani at 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.



More information about the wine-devel mailing list