mojira.dev
MC-308135

Large core shader files fail to load when using the Vulkan rendering backend

Hi, I would like to report a bug regarding how the game loads core shaders from resource packs.

Loading large core shader files from a resource pack causes java.lang.OutOfMemoryError (Out of stack space).

This issue is not present when using the OpenGL render backend (it doesn’t happen on earlier versions of the game either). I’m assuming that the shader source code is probably just too large to fit into memory which then causes the error.

Launching the game with this Java arg:

-Dorg.lwjgl.system.stackSize=4096

fixes the issue. The pack also loads fine when using the legacy OpenGL render backend. The only way to make it load with the Vulkan render backend is by increasing the stack size property. This seems to be related to LWJGL and not the OS, graphics driver or other variables.

I’ve also attached a small proof-of-concept resource pack that has a large fragment shader file (>256kb) as well as a log file from a failed pack-load attempt. It loads perfectly fine when using OpenGL but fails when Vulkan is being used.

This might not seem like a huge issue but it’s really problematic for resource-pack-enabled servers that use custom shader files to do special graphical effects.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Emily Winter

RogueLogix

Confirmed

Platform G

Normal

Rendering, Resource Packs

26.2 Snapshot 7

26.2 Pre-Release 2

Retrieved