Module: vkd3d
Branch: master
Commit: 8c15377ffcfe543304ab508db172fcbe764cb322
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/8c15377ffcfe543304ab508db172f…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com>
Date: Tue Feb 20 14:07:16 2024 +0100
vkd3d-shader/ir: Emit multilevel jumps in the structured program.
The new structurizer therefore reaches feature parity with the
older simple one, except for a couple of points:
* the old structurizer accepts any CFG, without requiring reducibility;
however, the DXIL specification requires the CFG to be reducible
anyway, so we're not really losing anything;
* the new structurizer additionally requires that no block has two
incoming back arrows; AFAIK this is condition that can happen,
but in practice it seems to be rare; also, it's not hard to add
support for it, as soon as it is decided it is useful.
On the other hand, the new structurizer makes use of the merging
information that are reconstructed from the CFG, which is important
for downstream optimization and fundamental for correctly emitting
tangled instructions.
Taking these considerations into account, the old structurizer is
considered superseded and is therefore removed.
---
libs/vkd3d-shader/ir.c | 256 ++++++++++++++++++++-----------------------------
1 file changed, 105 insertions(+), 151 deletions(-)