User avatar
Emanuele
Posts: 182
Joined: Wed Aug 03, 2011 5:28 pm
Contact: Website

Out of memory when linking shader (legacy driver)

Sun Oct 20, 2019 8:28 am

I am getting an error when running a 3D scene for Godot 3.2-alpha2 using the legacy driver (on a Raspberry Pi 3B+). The vc4 driver is running it fine.

Here is the error:

> SceneShaderGLES2: Program linking failed:
> ERROR:CUSTOM-6 (fragment shader, line -1) Out of memory

I guess my question is: Is there a way to increase the memory size used by the legacy shader compiler?

By the way, while this minimal example just returns an error, it also happened to me that more complex examples gave me a kernel panic.

You can find both the trace dump from apitrace (32_hello_3d.trace - it is for vc4, but it shouldn't be much different for bcm) if it is enough to reproduce the problem, and the "game pack" (32_hello_3d.zip) if you want to rerun the application here:

https://sourceforge.net/projects/frt/files/demos/

To run the game pack, get the engine runtime (frt_096_320a2_pi2.zip) from here:

https://sourceforge.net/projects/frt/files/previews/

And use it like this:

> frt_096_320a2_pi2.bin --main-pack 32_hello_3d.zip

The engine should work on both the vc4 driver (x11 or kms/drm) and the legacy driver. Exit by pressing ESC.

In the worst case, I can always blacklist the legacy driver, but if it can be made to work it would be great.

User avatar
Emanuele
Posts: 182
Joined: Wed Aug 03, 2011 5:28 pm
Contact: Website

Re: Out of memory when linking shader (legacy driver)

Tue Jan 28, 2020 8:33 pm

I've just tested a new version of Godot (3.2-rc4) and now my example renders OK.

It has been ages since I've tested it, so I don't know exactly what fixed it (most likely the Godot renderer changed).

My example really was minimal, though, so, in the end, I've decided to add the option to blacklist the legacy driver anyway. Hopefully, I'll be able to write a more realistic example soon to check if the problem really went away.

Return to “OpenGLES”