Crash: #extension directive is not allowed in the middle of a shader
FreeFull opened this issue ยท 5 comments
Describe the Bug
I've been able to avoid the crash by deleting this section of code from the shaders inside the Create and Flywheel .jars:
// optimize discard usage
#if defined(ALPHA_DISCARD)
#if defined(GL_ARB_conservative_depth)
#extension GL_ARB_conservative_depth : enable
layout (depth_greater) out float gl_FragDepth;
#endif
#endif
The issue seems to be that Mesa3D does not like #extension
being in the middle of a shader, rather than at the top.
Reproduction Steps
- Try launching minecraft with latest Create and Flywheel for 1.18.1
- The game crashes
Expected Result
Minecraft wouldn't crash.
Screenshots and Videos
No response
Crash Report or Log
https://gist.github.com/FreeFull/345e51d460c8c4067d9244cbdfad45e6
Operating System
Arch Linux
Mod Version
0.4.1
Minecraft Version
1.18.1
Forge Version
39.0.0
Other Mods
No response
Additional Context
No response
The files that contain the problematic code are Flywheel/src/main/resources/assets/flywheel/flywheel/shaders/context/world.glsl
and Create/src/main/resources/assets/create/flywheel/shaders/context/contraption.glsl
Thank you, the work around worked for my friend running Fedora 35 with an AMD gpu.