vkd3d-shader/ir: Dump the topological order of the control flow graph.

This commit is contained in:
Giovanni Mascellani 2024-02-02 23:35:21 +01:00 committed by Alexandre Julliard
parent ed40646c8a
commit cf9a023566
Notes: Alexandre Julliard 2024-03-08 23:47:19 +01:00
Approved-by: Conor McCarthy (@cmccarthy)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/672

View File

@ -3604,6 +3604,17 @@ static enum vkd3d_result vsir_cfg_sort_nodes(struct vsir_cfg *cfg)
vkd3d_free(in_degrees);
vsir_block_list_cleanup(&sorter.available_blocks);
if (TRACE_ON())
{
vkd3d_string_buffer_printf(&cfg->debug_buffer, "Block order:");
for (i = 0; i < cfg->order.count; ++i)
vkd3d_string_buffer_printf(&cfg->debug_buffer, " %u", cfg->order.blocks[i]->label);
TRACE("%s\n", cfg->debug_buffer.buffer);
vkd3d_string_buffer_clear(&cfg->debug_buffer);
}
return VKD3D_OK;
fail: