vkd3d-shader/hlsl: Turn hlsl_state_block_entry arguments into hlsl_src.

This allows to apply passes that replace instructions in
hlsl_state_block_entry.instrs.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Francisco Casas
2024-04-19 15:15:19 -04:00
committed by Alexandre Julliard
parent cefd6f9de6
commit 68483d070f
Notes: Alexandre Julliard 2024-05-08 22:49:51 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/802
3 changed files with 12 additions and 2 deletions

View File

@@ -136,7 +136,11 @@ struct hlsl_ir_var *hlsl_get_var(struct hlsl_scope *scope, const char *name)
static void free_state_block_entry(struct hlsl_state_block_entry *entry)
{
unsigned int i;
vkd3d_free(entry->name);
for (i = 0; i < entry->args_count; ++i)
hlsl_src_remove(&entry->args[i]);
vkd3d_free(entry->args);
hlsl_block_cleanup(entry->instrs);
vkd3d_free(entry->instrs);