godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.6k stars 20.75k forks source link

Shader compile error running android godot editor on chromebooks #97515

Open Gromph opened 5 days ago

Gromph commented 5 days ago

Tested versions

System information

Reproduces on our 2 chromebooks:

ChromeOS 103.0.5060.53 - Godot v4.3.stable - compatibility renderer - Acer Chromebook R11 (CB5-132T, C738T) - Celeron N3160

ChromeOS 126.0.6478.222 - Godot v4.3.stable - compatibility renderer - Dell Chromebook 5190 - Celeron N3350

Issue description

Running godot editor there is no 3d rendered, for example no grid lines or meshes drawn in new 3d scene. 2d is fine.

Godot4Chromebook

There are shader compile errors shown in adb logcat:

Creating new Godot fragment instance.

OnCreate: GodotFragment{75026bc} (035fb026-ec39-4ab5-8c63-f137278a4bb2 id=0x7f0800a1)
Initializing Godot plugin registry
OnInitNativeLayer: GodotFragment{75026bc} (035fb026-ec39-4ab5-8c63-f137278a4bb2 id=0x7f0800a1)
Godot native layer initialization completed: true
USER ERROR: Couldn't load file '/project.binary', error code 12.
   at: _load_settings_text_or_binary (core/config/project_settings.cpp:803)
Godot native layer setup completed
OnInitRenderView: GodotFragment{75026bc} (035fb026-ec39-4ab5-8c63-f137278a4bb2 id=0x7f0800a1)
OnStart: GodotFragment{75026bc} (035fb026-ec39-4ab5-8c63-f137278a4bb2 id=0x7f0800a1)
OnResume: GodotFragment{75026bc} (035fb026-ec39-4ab5-8c63-f137278a4bb2 id=0x7f0800a1)
Skipped 47 frames!  The application may be doing too much work on its main thread.
Loading /vendor/lib/hw/gralloc.cros.so from current namespace instead of sphal namespace.
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
Initialized EGL, version 1.4
Swap behavior 2
Device claims wide gamut support, cannot find matching config, error = EGL_SUCCESS
creating OpenGL ES 3.0 context :
Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
Loading /vendor/lib/hw/gralloc.cros.so from current namespace instead of sphal namespace.
Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
1: 
USER ERROR: SceneShaderGLES3: Program linking failed:
error: declarations for uniform `world_transform' have mismatching invariant qualifiers
   at: _display_error_with_code (drivers/gles3/shader_gles3.cpp:254)
USER ERROR: Method/function failed.
   at: _compile_specialization (drivers/gles3/shader_gles3.cpp:456)
USER WARNING: shader failed to compile, unable to bind shader.
   at: _version_bind_shader (./drivers/gles3/shader_gles3.h:222)
OpenGL API OpenGL ES 3.1 Mesa 19.0.0-rc5 (git-2e7833ad91) - Compatibility - Using Device: Intel Open Source Technology Center - Mesa DRI Intel(R) HD Graphics 400 (Braswell) 
PlayerBase::PlayerBase()
TrackPlayerBase::TrackPlayerBase()
Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 0 -> 1418

Displayed org.godotengine.editor.v4/org.godotengine.editor.GodotEditor: +2s522ms
Selected screen scale:  1
Selected screen scale:  1
Attempting to set client state on removed layer: Splash Screen org.godotengine.editor.v4#0
Attempting to destroy on removed layer: Splash Screen org.godotengine.editor.v4#0
OnGodotSetupCompleted
Skipping profile installation for org.godotengine.editor.v4
OnGodotMainLoopStarted

Steps to reproduce

  1. install Godot 4 from google play store on chromebook
  2. Run and create new project in compatibility mode
  3. There are no 3d grid lines drawn in 3d scene editor, meshes added to scene do not draw

Minimal reproduction project (MRP)

Just create a new project

Gromph commented 1 day ago

Commenting out line 323 in godot/drivers/gles3/shaders/scene.glsl Fixes the error on both our chromebooks: //invariant gl_Position;

I don't know much about shaders, so I don't know what other problems this change could cause. Our games look fine now though