Conor McCarthy (@cmccarthy) commented about libs/vkd3d-shader/ir.c:
- {
ERR("Entry point has %u incoming forward edges.\n", in_degrees[cfg->entry->label - 1]);
ret = VKD3D_ERROR_INVALID_SHADER;
goto fail;
- }
- vsir_block_list_init(&sorter.available_blocks);
- if ((ret = vsir_cfg_make_node_available(&sorter, cfg->entry)) < 0)
goto fail;
- while (sorter.available_blocks.count != 0)
- {
struct vsir_block *block = sorter.available_blocks.blocks[sorter.available_blocks.count - 1];
vsir_block_list_remove_index(&sorter.available_blocks, sorter.available_blocks.count - 1);
Not necessarily an issue, but there's a mismatch here between how blocks are added to `sorter` and how they are removed. The former uses a helper function on `struct vsir_cfg_node_sorter`, while the latter accesses an internal member of the struct. I get that `vsir_cfg_make_node_available()` ends up doing a lot more than `vsir_block_list_remove_index()` though. Also, do we need the `vsir_` prefix on `vsir_cfg_make_node_available()`, and should it be `cfg_node_sorter_make_node_available()`?