mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Initialize the block in clone_block().
This commit is contained in:
parent
733141720a
commit
5a3fe1609b
Notes:
Alexandre Julliard
2023-04-18 22:35:06 +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/153
@ -1422,6 +1422,8 @@ static bool clone_block(struct hlsl_ctx *ctx, struct hlsl_block *dst_block,
|
||||
const struct hlsl_ir_node *src;
|
||||
struct hlsl_ir_node *dst;
|
||||
|
||||
hlsl_block_init(dst_block);
|
||||
|
||||
LIST_FOR_EACH_ENTRY(src, &src_block->instrs, struct hlsl_ir_node, entry)
|
||||
{
|
||||
if (!(dst = clone_instr(ctx, map, src)))
|
||||
|
@ -721,7 +721,6 @@ static bool lower_calls(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *
|
||||
hlsl_error(ctx, &call->node.loc, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED,
|
||||
"Function \"%s\" is not defined.", decl->func->name);
|
||||
|
||||
hlsl_block_init(&block);
|
||||
if (!hlsl_clone_block(ctx, &block, &decl->body))
|
||||
return false;
|
||||
list_move_before(&call->node.entry, &block.instrs);
|
||||
|
Loading…
Reference in New Issue
Block a user