Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/vkd3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Mascellani <gmascellani@codeweavers.com>2021-09-24 16:04:39 +0300
committerGiovanni Mascellani <gmascellani@codeweavers.com>2022-07-26 15:48:56 +0300
commit48da0a36f5ba15af35b46e2814dbb4ad818c332a (patch)
tree56266d06f837f4fe0ac7a5b0b694f504fc611d0c
parentc5eafce5fa62e58d24cef19102b609fd4b531c4e (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.y7
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);
}