Skip to content
Snippets Groups Projects
Commit 991cddd1 authored by Elizabeth Figura's avatar Elizabeth Figura Committed by Alexandre Julliard
Browse files

vkd3d-shader/hlsl: Handle failure from hlsl_copy_deref().

parent 32999fc1
No related branches found
No related tags found
1 merge request!17Various HLSL refactoring.
......@@ -1047,8 +1047,17 @@ struct hlsl_ir_resource_load *hlsl_new_resource_load(struct hlsl_ctx *ctx, struc
return NULL;
init_node(&load->node, HLSL_IR_RESOURCE_LOAD, data_type, *loc);
load->load_type = type;
hlsl_copy_deref(ctx, &load->resource, resource);
hlsl_copy_deref(ctx, &load->sampler, sampler);
if (!hlsl_copy_deref(ctx, &load->resource, resource))
{
vkd3d_free(load);
return NULL;
}
if (!hlsl_copy_deref(ctx, &load->sampler, sampler))
{
hlsl_cleanup_deref(&load->resource);
vkd3d_free(load);
return NULL;
}
hlsl_src_from_node(&load->coords, coords);
hlsl_src_from_node(&load->texel_offset, texel_offset);
return load;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment