mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Introduce an hlsl_block_add_block() helper.
This commit is contained in:
parent
ceac81b816
commit
1da5a9a490
Notes:
Alexandre Julliard
2023-04-06 22:22:24 +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/138
@ -1023,7 +1023,7 @@ struct hlsl_ir_store *hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl
|
|||||||
vkd3d_free(store);
|
vkd3d_free(store);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
list_move_tail(&block->instrs, &comp_path_block.instrs);
|
hlsl_block_add_block(block, &comp_path_block);
|
||||||
hlsl_src_from_node(&store->rhs, rhs);
|
hlsl_src_from_node(&store->rhs, rhs);
|
||||||
|
|
||||||
if (type_is_single_reg(rhs->data_type))
|
if (type_is_single_reg(rhs->data_type))
|
||||||
@ -1215,7 +1215,7 @@ struct hlsl_ir_load *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_b
|
|||||||
vkd3d_free(load);
|
vkd3d_free(load);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
list_move_tail(&block->instrs, &comp_path_block.instrs);
|
hlsl_block_add_block(block, &comp_path_block);
|
||||||
|
|
||||||
hlsl_block_add_instr(block, &load->node);
|
hlsl_block_add_instr(block, &load->node);
|
||||||
|
|
||||||
|
@ -862,6 +862,11 @@ static inline void hlsl_block_add_instr(struct hlsl_block *block, struct hlsl_ir
|
|||||||
list_add_tail(&block->instrs, &instr->entry);
|
list_add_tail(&block->instrs, &instr->entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void hlsl_block_add_block(struct hlsl_block *block, struct hlsl_block *add)
|
||||||
|
{
|
||||||
|
list_move_tail(&block->instrs, &add->instrs);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void hlsl_src_from_node(struct hlsl_src *src, struct hlsl_ir_node *node)
|
static inline void hlsl_src_from_node(struct hlsl_src *src, struct hlsl_ir_node *node)
|
||||||
{
|
{
|
||||||
src->node = node;
|
src->node = node;
|
||||||
|
@ -114,7 +114,7 @@ static struct hlsl_ir_node *new_offset_instr_from_deref(struct hlsl_ctx *ctx, st
|
|||||||
deref->offset_regset, loc)))
|
deref->offset_regset, loc)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
list_move_tail(&block->instrs, &idx_block.instrs);
|
hlsl_block_add_block(block, &idx_block);
|
||||||
|
|
||||||
type = hlsl_get_element_type_from_path_index(ctx, type, deref->path[i].node);
|
type = hlsl_get_element_type_from_path_index(ctx, type, deref->path[i].node);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user