Skip to content

vkd3d-shader/ir: Synthesize selection constructs from conditional jumps.

Giovanni Mascellani requested to merge giomasce/vkd3d:vesuvio into master

This applies on top of !711 (merged), the last three commits belong here.

This MR and the following ones will introduce a number of optimization passes on the structured representation of the shader, with the goal of fixing the idiosyncrasies of the code generated by the new structurizer. The general pattern is that we want to recognize when the combination of loops and jumps can be rather written with selection constructs. Ideally that should bring to removing all the synthesized loop intervals, but that cannot be guaranteed in general. We still want to do remove all the loops we can, first to make the generated code easier to read and to recompile, and second because having fewer loops also means that more multilevel jumps become ordinary single level jumps, which do not require overhead to be represented in SPIR-V.

Edited by Giovanni Mascellani

Merge request reports

Loading