-
Bug
-
Resolution: Fixed
-
21w14a
-
None
-
Plausible
-
Crash, Rendering
-
Very Important
AMD drivers ship with a bug that causes a crash on some glShaderSource calls. This causes the game to crash randomly when loading a world and almost every time when reloading resource packs when graphics settings are set to fabulous. A crash dump is attached to this issue
This issue isn't directly Minecraft's fault, but the bug has been present for almost a year and so a workaround would be ideal.
This can be "fixed" by replacing the GL20.glShaderSource call in com.mojang.blaze3d.platform.GlStateManager.glShaderSource with
final MemoryStack stack = MemoryStack.stackGet(); final int stackPointer = stack.getPointer(); try { StringBuilder builder = new StringBuilder(); for (String string : strings) { builder.append(string); } final ByteBuffer sourceBuffer = MemoryUtil.memUTF8(builder.toString(), true); final PointerBuffer pointers = stack.mallocPointer(1); pointers.put(sourceBuffer); GL20C.nglShaderSource(shader, 1, pointers.address0(), 0); org.lwjgl.system.APIUtil.apiArrayFree(pointers.address0(), 1); } finally { stack.setPointer(stackPointer); }
- relates to
-
MC-224445 Reloading resource packs with fabulous graphics causes screen to become black, after a few times causes crash for AMD drivers
- Resolved