mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/ir: Keep a reference to the message context inside struct vsir_cfg.
This commit is contained in:
parent
9ac842b36b
commit
088a6c49a2
Notes:
Alexandre Julliard
2024-03-07 23:22:05 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/662
@ -3098,6 +3098,7 @@ static void vsir_block_cleanup(struct vsir_block *block)
|
|||||||
|
|
||||||
struct vsir_cfg
|
struct vsir_cfg
|
||||||
{
|
{
|
||||||
|
struct vkd3d_shader_message_context *message_context;
|
||||||
struct vsir_program *program;
|
struct vsir_program *program;
|
||||||
struct vsir_block *blocks;
|
struct vsir_block *blocks;
|
||||||
struct vsir_block *entry;
|
struct vsir_block *entry;
|
||||||
@ -3185,13 +3186,15 @@ static void vsir_cfg_dump_dot(struct vsir_cfg *cfg)
|
|||||||
TRACE("}\n");
|
TRACE("}\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum vkd3d_result vsir_cfg_init(struct vsir_cfg *cfg, struct vsir_program *program)
|
static enum vkd3d_result vsir_cfg_init(struct vsir_cfg *cfg, struct vsir_program *program,
|
||||||
|
struct vkd3d_shader_message_context *message_context)
|
||||||
{
|
{
|
||||||
struct vsir_block *current_block = NULL;
|
struct vsir_block *current_block = NULL;
|
||||||
enum vkd3d_result ret;
|
enum vkd3d_result ret;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
memset(cfg, 0, sizeof(*cfg));
|
memset(cfg, 0, sizeof(*cfg));
|
||||||
|
cfg->message_context = message_context;
|
||||||
cfg->program = program;
|
cfg->program = program;
|
||||||
cfg->block_count = program->block_count;
|
cfg->block_count = program->block_count;
|
||||||
|
|
||||||
@ -3440,7 +3443,7 @@ enum vkd3d_result vkd3d_shader_normalise(struct vkd3d_shader_parser *parser,
|
|||||||
if ((result = materialize_ssas_to_temps(parser)) < 0)
|
if ((result = materialize_ssas_to_temps(parser)) < 0)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if ((result = vsir_cfg_init(&cfg, &parser->program)) < 0)
|
if ((result = vsir_cfg_init(&cfg, &parser->program, parser->message_context)) < 0)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
vsir_cfg_compute_dominators(&cfg);
|
vsir_cfg_compute_dominators(&cfg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user