question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash: #extension directive is not allowed in the middle of a shader

See original GitHub issue

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

  1. Try launching minecraft with latest Create and Flywheel for 1.18.1
  2. 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Jozufozucommented, Dec 29, 2021

Fixed in latest versions of Create and Flywheel.

0reactions
ZoelParentcommented, Dec 23, 2021

Thank you, the work around worked for my friend running Fedora 35 with an AMD gpu.

Read more comments on GitHub >

github_iconTop Results From Across the Web

extension directive is not allowed in the middle of a shader ...
The bug is triggered on Mesa based linus OpenGL drivers: error: #extension directive is not allowed in the middle of a shader Some...
Read more >
[v2.1.1] error: #extension directive is not allowed in the middle ...
HI there! We are having troubles getting the desired hardware to use in our currents and previous proyects due to the sortage of...
Read more >
[SOLVED] Problem with PBR : extension directive is not ...
Hi friends When running TestPBRLighting.java i am getting an exception full detail : INFO: Running on jMonkeyEngine 3.2-1 * Branch: master * Git...
Read more >
Issue on using an extension for GLSL when updating three.js
I'm currently upgrading three.js from a 2015 version, to the latest! However it seems that the GLSL shaders work in a slightly different...
Read more >
91480 – Dead Island: Crash loading Act 3 possible shader issue
FWIW I can't reproduce the segfault by running through glsl_compiler. I do, however, get a 0:35(1): error: #extension directive is not allowed in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found