Skip to content

vkd3d-shader/spirv: Introduce a SPIR-V parser, part 1/∞.

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

The idea is that it might eventually become part of a SPIR-V to MSL converter, possibly with the option to mangle the program inbetween using VSIR. SPIRV-Cross already supports converting to SPIR-V to MSL, but it doesn't have an IR, so it's hard to transform shaders in non-trivial ways. My plan is also to make descriptor mapping sufficiently configurable (Evan has some opinions about that and I'll ask his input when the time for this comes).

One of the main difficulties I currently see ahead is the fact that currently in VSIR descriptors are very much modelled around Microsoft bytecodes, and the vkd3d-shader API is designed for mapping Microsoft descriptors to Khronos descriptors. I guess we'll probably need to find abstractions over that, but I haven't thought this problem through yet. The problem seems solvable anyway, and it can probably be tackled once the parser is able to ingest simple shaders correcty.

Merge request reports

Loading