diff options
author | Giovanni Mascellani <gmascellani@codeweavers.com> | 2021-09-24 16:04:39 +0300 |
---|---|---|
committer | Giovanni Mascellani <gmascellani@codeweavers.com> | 2022-07-26 15:48:56 +0300 |
commit | 48da0a36f5ba15af35b46e2814dbb4ad818c332a (patch) | |
tree | 56266d06f837f4fe0ac7a5b0b694f504fc611d0c | |
parent | c5eafce5fa62e58d24cef19102b609fd4b531c4e (diff) |
vkd3d-shader/hlsl: Use the hlsl_new_store() helper.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
-rw-r--r-- | libs/vkd3d-shader/hlsl.y | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 89ac6259..d73f5f27 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1819,13 +1819,8 @@ static struct hlsl_ir_node *add_assignment(struct hlsl_ctx *ctx, struct list *in { struct hlsl_ir_store *store; - if (!(store = hlsl_alloc(ctx, sizeof(*store)))) + if (!(store = hlsl_new_store(ctx, hlsl_ir_load(lhs)->src.var, hlsl_ir_load(lhs)->src.offset.node, rhs, writemask, lhs->loc))) return NULL; - init_node(&store->node, HLSL_IR_STORE, NULL, lhs->loc); - store->writemask = writemask; - store->lhs.var = hlsl_ir_load(lhs)->src.var; - hlsl_src_from_node(&store->lhs.offset, hlsl_ir_load(lhs)->src.offset.node); - hlsl_src_from_node(&store->rhs, rhs); list_add_tail(instrs, &store->node.entry); } |