godotengine / godot

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

GLES3 HTML5 MeshInstance GL_INVALID_OPERATION #46905

Open ghost opened 3 years ago

ghost commented 3 years ago

Godot version: 3.2.3.stable

OS/device including version: Linux with Nvidia Drivers (460.39) Chromium 89

Issue description: For every mesh instance added to the scene this gets logged to Chromiums console: GL_INVALID_OPERATION: It is undefined behaviour to have a used but unbound uniform buffer.

Steps to reproduce:

  1. Create scene
  2. Add MeshInstance and camera
  3. Click Run in Browser

Browser GLES3.zip

Calinou commented 3 years ago

@github5435 Please upload a minimal reproduction project to make this easier to troubleshoot.

Also:

ghost commented 3 years ago

@Calinou Alright, I will add the sample project.

GLES2 works fine on Chromium, I didn't get any warnings.

GLES3 on Firefox 86, I didn't get that same error but instead I got: WebGL warning: drawElementsInstanced: Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE.

Faless commented 3 years ago

This seem to happen here in _render_geometry: https://github.com/godotengine/godot/blob/e2c28675efe439a83f650795aba3d2dda6d7c9d6/drivers/gles3/rasterizer_scene_gles3.cpp#L1539-L1542

The error is spit only once, I'm not sure if next errors are suppressed or not, but it might be an initialization problem otherwise.

EDIT: ~For some reasons _setup_geometry doesn't seem to be called for the multimesh. But my experience with the rendering code is very limited.~ EDIT2: Of course, it's a meshinstance, not a multimesh. I'll keep digging.