Fixed AMD issues with SPIR-V Shaders
PR impact
List of related issues/PRs this will solve:
| Impact | Issue/PR |
|---|---|
| Issues this solves | #440 |
| Other PRs this solves | #504 |
Closes #440
Proposed fix
Using shader sources generated by SpirV-Cross for OpenGL with AMD GPU instead of the Spirv-V binary. Storing the opengl program binary like Spir-V binary and loading it when it exist.
Maybe there is a better way of detecting when using AMD GPU ?
Additional context
- [x] Debug - x64
- [x] Release - x64
- [x] Dist - x64
I check this on my laptop, where was previously with AMD and now is working :D
Can confirm this fixes (although workaround) the issue on my system:
Vendor: ATI Technologies Inc. Renderer: Radeon RX 580 Series Version: 4.6.14802 Compatibility Profile/Debug Context 21.12.1 30.0.14011.3017
I too can confirm that this fixes the problem on my system: Renderer: AMD Radeon(TM) Vega 10 Graphics Vendor: ATI Technologies Inc. Version: 4.6.13596 Compatibility Profile/Debug Context 20.10.12.09 27.20.11012.9001
I assume this can be close when Cherno switch to Vulkan.
@FinalDeath61 I tried this and it fixes the crash but all objects disappear when I pressed Play, do you have any idea what could be the issue?
@FinalDeath61 I tried this and it fixes the crash but all objects disappear when I pressed Play, do you have any idea what could be the issue?
Some more information would be helpful. Was it working before or did you clone, make the adjustment and then found out it wasn't working? Are there any entities in the scene hierarchy? Is there even anything being rendered (check stats)? Those are the first things I think about. If that doesn't give you an idea, the debugging begins :)
@FinalDeath61 I tried this and it fixes the crash but all objects disappear when I pressed Play, do you have any idea what could be the issue?
It's probably not related to the SPIR-V issue. You probably have an issue in the scene copy, or maybe you don't give the actual scene to your runtime. I suggest that you watch the episodes of the game engine serie related to scene start stop to. (https://youtube.com/playlist?list=PLlrATfBNZ98dC-V-N3m0Go4deliWHPFwT)
I have looked through the AMD forums again and unfortunately there is no response to the issue, so I think this workaround seems necessary for now. Curious how other developers work around this issue. Haven't tested with the current driver version though, so they could have fixed it without a mention in the release notes.
This seems to have been resolved with one of the driver updates from AMD. I'm currently on version 23.5.2, and it runs just fine without any AMD workaround (which I had been using until now, but was causing other issues).
This seems to have been resolved with one of the driver updates from AMD. I'm currently on version 23.5.2, and it runs just fine without any AMD workaround (which I had been using until now, but was causing other issues).
I'll try it with an AMD driver >= 23.5.2 and will close the issue if it work. Thanks for the heads-up 👍
I can confirme it SPIR-V shader now work in AMD with driver version 23.5.2. I close the MR and issue.