[PATCH vkd3d 05/17] vkd3d-shader/hlsl: Introduce add_load_component().

Zebediah Figura zfigura at codeweavers.com
Fri Jul 15 16:52:39 CDT 2022


Patch series looks mostly fine now, just going to throw some nitpicks in 
there, or things I didn't notice the first time...

On 7/14/22 20:23, Francisco Casas wrote:
> +    else
> +    {
> +        struct vkd3d_string_buffer *name;
> +        struct hlsl_ir_store *store;
> +
> +        name = vkd3d_string_buffer_get(&ctx->string_buffers);
> +        vkd3d_string_buffer_printf(name, "<deref-%p>", var_node);
> +        var = hlsl_new_synthetic_var(ctx, name->buffer, var_node->data_type, var_node->loc);
> +        vkd3d_string_buffer_release(&ctx->string_buffers, name);

hlsl_get_string_buffer() [which can fail due to memory exhaustion] and 
hlsl_release_string_buffer().

> +        if (!var)
> +            return NULL;
> +
> +        if (!(store = hlsl_new_simple_store(ctx, var, var_node)))
> +            return NULL;
> +        list_add_tail(instrs, &store->node.entry);
> +    }
> +
> +    if (!(load = hlsl_new_load(ctx, var, offset, comp_type, *loc)))
> +        return NULL;
> +    list_add_tail(instrs, &load->node.entry);
> +
> +    return load;
> +}
> +



More information about the wine-devel mailing list