-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SPIRV -> DXIL #4969
Comments
Hello! This won't be the goal of this compiler, since we really focus on HLSL -> some IR translation, but you might want to look into mesa, apparently they have a SPIRV->DXIL library which receives patches, just unsure of the support level:
|
@Keenuts - thank you. Can this be raised internally that there is at least some interest to do this work? The Godot game engine used Mesa godotengine/godot#70315 and they said that was better than the alternative (Spirv-cross) but it still uses an intermediate layer "NIR". Given that SPIRV and DXIL are the two main modern solutions, surely other teams are also running into this hurdle. But seems like there isn't much interest from projects that work on this sort of work (see HansKristian-Work/dxil-spirv#103 ). I will look into Mesa as an option. Thank you for your time! |
Hello again! |
seeing number of people waiting for stuff like virtio-win/kvm-guest-drivers-windows#943, it is frustrating that SPIRV to DXIL direct translation does not exist. if
then compiler knows a whole lot than it's letting on. making a lookup table for all commands combined we are talking about 1000 function pointers (some map directly 1:1, others map to a wrapper)? worth spending time here in one place rather than telling everyone out in the wild to coin the whole thing. such mapping will also help testing https://devblogs.microsoft.com/directx/directx-adopting-spir-v/ down the road, so it's a win-win |
Hi,
Not sure what you are referring to with the
DXC does not uses the same path for both DXIL and SPIR-V. And last bit, VirtioGPU on Windows is not just a matter of translating DXIL to SPIR-V, but also translating a guest Win32 app 3D call (Possibly DX9, DX12, Vk or even OpenGL) into virgl commands so it can be translated again into something the host can support (maybe the host only supports OpenGL). |
@Keenuts thanks for the clarification! I’ll admit, I’m not an expert in this area. The linked blog post vaguely stated that building the SPIR-V environment for DirectX will take several years. I was curious why this would take so long, especially considering that DXC appears to provide a lot of prior art. Now I understand that it’s essentially a ground-up development effort. |
Apologies if I missed this, I looked around and didn't see this already.
Would like to request converting from SPIRV -> DXIL . From what I understand there is already functionality that supports the opposite.
Currently working on a project that takes GLSL and converts to SPIRV then generates HLSL off of that so that it can then compile that HLSL into formats that DX11 and DX12 can leverage. This happens in realtime due to how our software works. It would be much more efficient to go directly from SPIRV to DXIL but no systems seem to support this (we currently use SPIRV-Cross).
The text was updated successfully, but these errors were encountered: