mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Clean-up instruction block for offset node creation.
This commit is contained in:
parent
ab463f74bd
commit
e93568f290
Notes:
Alexandre Julliard
2023-10-31 22:38:12 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/396
@ -29,8 +29,6 @@ static struct hlsl_ir_node *new_offset_from_path_index(struct hlsl_ctx *ctx, str
|
|||||||
struct hlsl_ir_node *idx_offset = NULL;
|
struct hlsl_ir_node *idx_offset = NULL;
|
||||||
struct hlsl_ir_node *c;
|
struct hlsl_ir_node *c;
|
||||||
|
|
||||||
hlsl_block_init(block);
|
|
||||||
|
|
||||||
switch (type->class)
|
switch (type->class)
|
||||||
{
|
{
|
||||||
case HLSL_CLASS_VECTOR:
|
case HLSL_CLASS_VECTOR:
|
||||||
@ -111,9 +109,14 @@ static struct hlsl_ir_node *new_offset_instr_from_deref(struct hlsl_ctx *ctx, st
|
|||||||
{
|
{
|
||||||
struct hlsl_block idx_block;
|
struct hlsl_block idx_block;
|
||||||
|
|
||||||
|
hlsl_block_init(&idx_block);
|
||||||
|
|
||||||
if (!(offset = new_offset_from_path_index(ctx, &idx_block, type, offset, deref->path[i].node,
|
if (!(offset = new_offset_from_path_index(ctx, &idx_block, type, offset, deref->path[i].node,
|
||||||
regset, loc)))
|
regset, loc)))
|
||||||
|
{
|
||||||
|
hlsl_block_cleanup(&idx_block);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
hlsl_block_add_block(block, &idx_block);
|
hlsl_block_add_block(block, &idx_block);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user