mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Return bool from hlsl_new_store_component().
This commit is contained in:
committed by
Alexandre Julliard
parent
6129399b4f
commit
145a2dfd2d
Notes:
Alexandre Julliard
2023-05-09 22:25:23 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/196
@@ -1105,7 +1105,7 @@ struct hlsl_ir_store *hlsl_new_store_index(struct hlsl_ctx *ctx, const struct hl
|
||||
return store;
|
||||
}
|
||||
|
||||
struct hlsl_ir_store *hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||
bool hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl_block *block,
|
||||
const struct hlsl_deref *lhs, unsigned int comp, struct hlsl_ir_node *rhs)
|
||||
{
|
||||
struct hlsl_block comp_path_block;
|
||||
@@ -1114,13 +1114,13 @@ struct hlsl_ir_store *hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl
|
||||
hlsl_block_init(block);
|
||||
|
||||
if (!(store = hlsl_alloc(ctx, sizeof(*store))))
|
||||
return NULL;
|
||||
return false;
|
||||
init_node(&store->node, HLSL_IR_STORE, NULL, &rhs->loc);
|
||||
|
||||
if (!init_deref_from_component_index(ctx, &comp_path_block, &store->lhs, lhs, comp, &rhs->loc))
|
||||
{
|
||||
vkd3d_free(store);
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
hlsl_block_add_block(block, &comp_path_block);
|
||||
hlsl_src_from_node(&store->rhs, rhs);
|
||||
@@ -1130,7 +1130,7 @@ struct hlsl_ir_store *hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl
|
||||
|
||||
hlsl_block_add_instr(block, &store->node);
|
||||
|
||||
return store;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct hlsl_ir_node *hlsl_new_call(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *decl,
|
||||
|
Reference in New Issue
Block a user