[Linux] Error while compiling GLSL shader. []
Release Type: Official Release
Version: 4.1.0.1805+
Platform(s): Linux
Describe the bug
It is not possible to play any game during runtime because of error : Error while compiling GLSL shader. []
To Reproduce Steps to reproduce the behavior:
- Run GameStudio
- Create new project based on SpaceEscape template
- Add Linux platform
- Go to Linux platform project and build It to test executable on Linux
- Run
Expected behavior The application should work flawlessly
Log and callstacks stacktrace.txt
Additional context What interesting though, You can run without any issues OpenGL app on Windows, so it might be easy to solve once you find the cause of the problem. This issue will be updated as my investigation continues.
I found another way to reproduce the error:
- create a project from an empty template - select HDR and Level 11
- remove skybox and leave only two elements for Main Scene - camera and light.
- import any custom model (for testing purposes I used royality free Train kit from Kenney).
Another use case:
1 . create a project from an empty template 2. remove skybox and leave only two elements for Main Scene - camera and light.
- this time import only spritesheet (download any image from the internet or create by yourself) and add it to the scene
Works
Conclusion : Both Procedural and Imported models may share a common code that is flawed
Edit: Error occurs for MeshRenderFeature
Okay...That's new.
Another use case 1 . create a project from an empty template, but this time don't check the HDR option and use LDR instead - also pick lowest API level - Level 9 2. remove skybox and leave only two elements for Main Scene - camera and light. 3. import any model - procedural cube for example
Works!
Those steps sound like a similar issue to the mobile issue steps https://github.com/stride3d/stride/issues/2485
You might be able to just uncheck Generate mipmaps if Im right? I dont know how much that info actually helps you but if its true it may be useful.
I'm not sure if this is the case because my test projects don't contain any materials at all 😕
I compared the shader scripts and on both Windows and Linux they are the same Edit: Only difference I didn't noticed is GL.CreateProgram return 0. Also, SDL.MakeCurrent fails...
Another progress, I was able to capture SDL error:
INFO: Unable to make EGL context current (call to eglMakeCurrent failed, reporting an error of EGL_BAD_ACCESS) -1
Huh...Good news ! Looks like I have managed to making it work! Bad news is that there is something wrong with wayland Setting following env variable to X11 fixed an issue:
export SDL_VIDEODRIVER=x11
According to one of the SDL contributors, it seems that SDL_EG_MakeCurrent is limited to a single context for wayland. See https://github.com/libsdl-org/SDL/issues/9072 for more details. I propose as temp workaroud to set X11 as a drvier until someone fixes it in SDL repo or we should adapt our rendering system. Perhabs someone smarter than me could figure out