Comments (12)
@iwubcode We extracted the relevant bits from the MESA repository and now go via NIR. Probably still not ideal,but it works a lot better than SPIRV Cross -> HLSL -> DXIL.
Still hoping this project or another would write a dedicated converter at some point, as I think it should probably be easier to go SPIRV->DXIL, given how complex DXIL is in comparison.
from dxil-spirv.
Have you considered doing SPIR-V -> HLSL with SPIRV-Cross and then running that through dxc?
from dxil-spirv.
Yes, but for performance (and amount of failure points) reasons a more direct approach may be preferred.
from dxil-spirv.
DXIL to SPIR-V
This is exactly what this project does.
from dxil-spirv.
@doitsujin my mistake, meant the opposite way.
from dxil-spirv.
https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/microsoft/spirv_to_dxil
from dxil-spirv.
@nanokatze I think I have seen this in the past, but it relies for the most part on the Mesa IL right? Its a huge amount of code. Maybe it could be extracted?
from dxil-spirv.
Emitting LLVM (has to be 3.7 version specifically) is a bit of a shitshow, but that's the main issue with emitting DXIL, although it is completely out of scope of this project. RenderDoc should have a DXIL emitter I think, although not sure how practical that is to use for SPIR-V translation.
Another issue is emitting the DXIL in the exact way that DXIL validators like. It's not documented at all, but not exactly sure how difficult it is to deal with.
Emitting subgroup operations properly is also quite awkward with control flow (or lack there of) being what it is in DXIL.
from dxil-spirv.
I see, its kind of a shame that no simple way to do this conversion exists. SPIRV-Cross has it out of scope, as well as this project. MESA has a converter but its entirely dependent on lots of MESA files.
This makes it very difficult to work on multi platform code that uses SPIR-V universally, as it is not possible to easily/efficiently convert to DXIL.
from dxil-spirv.
Do you also support DX11? You'll probably have the same problem with DXBC there.
from dxil-spirv.
No, no interest from our part in suporting DX11, only Vulkan level APIs.
from dxil-spirv.
@reduz - curious what you ended up doing? Currently we use glsang to take GLSL to SPIRV and then SPIRV-Cross to go to HLSL...then go to DXIL (DX12 backend) and DXBC (DX11 backend). It works but it's in realtime and is quite slow, cutting out a step would be very helpful (even if only for DX12).
I did open an issue on DirectXShaderCompiler but not expecting much.
from dxil-spirv.
Related Issues (20)
- Error: Failed to parse blob HOT 2
- Justice RTX demo attached shader fails to compile..
- parseIR doesn't read all bits HOT 1
- Can the glsl code output keep the constant buffer variable names? HOT 3
- Guardians of the Galaxy RT shaders cause segfault during conversion HOT 1
- Resident Evil:Village issue HOT 1
- convert fail from dxil to spirv
- Hogwarts Legacy RT shaders are translated into invalid SPIR-V HOT 1
- Renaming spirv-headers HOT 8
- 3DMark Sampler feedback feature test fails to run with "Unimplemented DXIL opcode 177".. HOT 6
- gpuopen TressFX sample assertion HOT 3
- Compilation for Wine fails HOT 1
- Assertion failed: frontier HOT 5
- Assertion failed - Battlefield 2042
- Random switch + continue shenanigans HOT 1
- "There is no candidate for ladder merging." x2 HOT 1
- Assertion in debug mode `assert(node->headers[0]->selection_merge_block == node);`
- Rare infinite loop in recompute_immediate_post_dominator HOT 1
- Assertion failed in CFGNode::retarget_branch HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxil-spirv.