mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/ir: Dump the loops in the control flow graph.
This commit is contained in:
parent
8241ca2b67
commit
3d4092d9dc
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
@ -3391,7 +3391,7 @@ static enum vkd3d_result vsir_cfg_scan_loop(struct vsir_block_list *loop, struct
|
||||
|
||||
static enum vkd3d_result vsir_cfg_compute_loops(struct vsir_cfg *cfg)
|
||||
{
|
||||
size_t i, j;
|
||||
size_t i, j, k;
|
||||
|
||||
if (!(cfg->loops_by_header = vkd3d_calloc(cfg->block_count, sizeof(*cfg->loops_by_header))))
|
||||
return VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
@ -3423,6 +3423,17 @@ static enum vkd3d_result vsir_cfg_compute_loops(struct vsir_cfg *cfg)
|
||||
if ((ret = vsir_cfg_scan_loop(loop, block, header)) < 0)
|
||||
return ret;
|
||||
|
||||
if (TRACE_ON())
|
||||
{
|
||||
vkd3d_string_buffer_printf(&cfg->debug_buffer, "Back edge %u -> %u with loop:", block->label, header->label);
|
||||
|
||||
for (k = 0; k < loop->count; ++k)
|
||||
vkd3d_string_buffer_printf(&cfg->debug_buffer, " %u", loop->blocks[k]->label);
|
||||
|
||||
TRACE("%s\n", cfg->debug_buffer.buffer);
|
||||
vkd3d_string_buffer_clear(&cfg->debug_buffer);
|
||||
}
|
||||
|
||||
if (cfg->loops_by_header[header->label - 1] != SIZE_MAX)
|
||||
{
|
||||
FIXME("Block %u is header to more than one loop, this is not implemented.\n", header->label);
|
||||
|
Loading…
x
Reference in New Issue
Block a user