HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.82k stars 190 forks source link

RFC: Add application to compile batches of HLSL shaders #1836

Closed doitsujin closed 7 months ago

doitsujin commented 7 months ago

As discussed on Discord, this could be used to make writing tests less painful by allowing us to simply run the exe within a directory that contains HLSL shaders and spits out plain C headers. Draft for now to gauge whether this is going in the right direction.

Currently, this works as follows:

All of this could be changed or expanded if necessary (e.g. to allow for changing entry point names, or supporting multiple entry points per file), but for now I went with a fairly minimal approach. I haven't really looked into whether special options are necessary when compiling raytracing/workgraph shaders or shaders with embedded root signatures.