mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/fx: Fix state block entry array shifting when decomposing.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
7c3677b114
commit
1559237780
Notes:
Henri Verbeet
2024-08-06 16:59:31 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/985
@ -1824,7 +1824,7 @@ static unsigned int decompose_fx_4_state_block(struct hlsl_ir_var *var, struct h
|
||||
if (entry_index != block->count - 1)
|
||||
{
|
||||
memmove(&block->entries[entry_index + entry->args_count], &block->entries[entry_index + 1],
|
||||
(entry->args_count - 1) * sizeof(*block->entries));
|
||||
(block->count - entry_index - 1) * sizeof(*block->entries));
|
||||
}
|
||||
block->count += entry->args_count - 1;
|
||||
|
||||
@ -1839,7 +1839,7 @@ static unsigned int decompose_fx_4_state_block(struct hlsl_ir_var *var, struct h
|
||||
}
|
||||
hlsl_free_state_block_entry(entry);
|
||||
|
||||
return entry->args_count - 1;
|
||||
return entry->args_count;
|
||||
}
|
||||
|
||||
static void write_fx_4_state_block(struct hlsl_ir_var *var, unsigned int block_index,
|
||||
|
Loading…
Reference in New Issue
Block a user