Skip to content
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

Interest on DXIL<->SPIRV translation.. #68

Closed
oscarbg opened this issue Feb 4, 2017 · 6 comments
Closed

Interest on DXIL<->SPIRV translation.. #68

oscarbg opened this issue Feb 4, 2017 · 6 comments
Labels
enhancement Feature suggestion spirv Work related to SPIR-V

Comments

@oscarbg
Copy link

oscarbg commented Feb 4, 2017

I know DXIL is still in it's infancy but would be nice if we could get DXIL from existing SPIRV shaders and viceversa SPIRV from DXIL shaders..
any interest by Microsoft on writing should a bidirectional shader translator or better to ask Khronos guys?..
thanks..

@marcelolr
Copy link
Contributor

@oscarbg, we have no objection to people writing translator tools. Part of our motivation for opening this up is to allow developers to organize and develop around the solutions they care about the most, including porting this around or porting the output around (https://blogs.msdn.microsoft.com/directx/2017/01/23/new-directx-shader-compiler-based-on-clangllvm-now-available-as-open-source/).

That said, right now we're focused on making DXIL & the associated toolset the best we can. But if there are contributions to help people get started on this we can certainly talk about getting those merged.

Does this help understand where we are on this at the moment?

@oscarbg
Copy link
Author

oscarbg commented Feb 7, 2017

Yes.. thanks for info..
hope eventually gets done.. maybe too early to ask for it..

@antiagainst
Copy link
Contributor

Hi @oscarbg, we will be taking on this. Please see #216 for details. :)

@oscarbg
Copy link
Author

oscarbg commented Apr 21, 2017

@marcelolr I haven't asked Microsoft guys if they are interested in adding DXIL->LLVM IR support..
so let's asks it: it's Microsoft interested in open sourcing a DXIL->LLVM IR translator?
this would also allow going indirectly to SPIRV via DXIL->LLVM IR->SPIRV by adding Vulkan support to Khronos LLVM IR<-> SPIRV translator..
thanks..

@dmpots
Copy link
Contributor

dmpots commented Apr 21, 2017

@oscarbg DXIL is already valid LLVM IR. We represent DirectX-specific things using a combination of external function calls and LLVM metadata. We did not make any changes to the actual representation of LLVM IR so any stock LLVM should be able to load and process DXIL as normal LLVM IR.

Of course to understand the semantics of DXIL you need to teach the compiler the meaning of the external function calls and how to interpret the metadata. So a translator from DXIL -> SPIRV would need to understand the semantics of DXIL, but the translation to LLVM IR should be a nop for DXIL.

@oscarbg
Copy link
Author

oscarbg commented Apr 26, 2017

Thanks @dmpots for details..
also good news seems https://github.com/gongminmin/Dilithium is doing just what I asked..
still early days for this project..
anyway hopefully this porject will be successful implementing it..

@hekota hekota added enhancement Feature suggestion spirv Work related to SPIR-V labels May 16, 2018
@hekota hekota closed this as completed May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature suggestion spirv Work related to SPIR-V
Projects
None yet
Development

No branches or pull requests

5 participants