Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL_INVALID_OPERATION error with GLES3 when loading project in verbose mode #33787

Closed
pouleyKetchoupp opened this issue Nov 21, 2019 · 2 comments · Fixed by #33792
Closed

GL_INVALID_OPERATION error with GLES3 when loading project in verbose mode #33787

pouleyKetchoupp opened this issue Nov 21, 2019 · 2 comments · Fixed by #33792

Comments

@pouleyKetchoupp
Copy link
Contributor

Godot version:
Master 2981915

OS/device including version:
Windows 10

Issue description:
In the editor, when loading any project setup with GLES3 in verbose mode, an error systematically occurs on startup.

No error occurs when the project is setup with GLES2.

Logged error:

ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. Wrong component type or count.
   At: drivers\gles3\rasterizer_gles3.cpp:123

Callstack:

CubemapFilterShaderGLES3::set_uniform(CubemapFilterShaderGLES3::Uniforms p_uniform, float p_value) Line 44	C++
RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_radiance_size) Line 1858	C++
VisualServerRaster::sky_set_texture(RID arg1, RID arg2, int arg3) Line 179	C++
VisualServerWrapMT::sky_set_texture(RID p1, RID p2, int p3) Line 115	C++
ProceduralSky::_radiance_changed() Line 131	C++
ProceduralSky::_update_sky() Line 420	C++
MethodBind0<ProceduralSky>::call(Object * p_object, const Variant * * p_args, int p_arg_count, Variant::CallError & r_error) Line 149	C++
Object::call(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant::CallError & r_error) Line 921	C++
MessageQueue::_call_function(Object * p_target, const StringName & p_func, const Variant * p_args, int p_argcount, bool p_show_error) Line 254	C++
MessageQueue::flush() Line 303	C++
SceneTree::iteration(float p_time) Line 486	C++
Main::iteration() Line 1957	C++

Steps to reproduce:

  • Create an empty project setup with GLES3
  • Start godot editor with the following command line arguments:
    -v -e --path [project_path]
  • Observe error

Minimal reproduction project:
Any project loaded in verbose mode and configured with GLES3.

@akien-mga akien-mga added this to the 3.2 milestone Nov 21, 2019
@akien-mga
Copy link
Member

akien-mga commented Nov 21, 2019

I can confirm on Linux (Mesa 19.2.2). The error message is a bit more explicit:

ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 16  Severity: High  Message: GL_INVALID_OPERATION in glUniform1("source_mip_level"@1 is int, not float)
   At: drivers/gles3/rasterizer_gles3.cpp:123.

Related to #33779.

It seems this should be int and not float, so #33779 fixed the wrong occurrence and it's this one which should have been cast to int?

1856:           shaders.cubemap_filter.set_uniform(CubemapFilterShaderGLES3::SOURCE_MIP_LEVEL, MAX(Math::log(float(texture->width)) / Math::log(2.0f) - 10.0f, 0.0f));

@clayjohn
Copy link
Member

Looks like I didn't correct fix this last night.

This line needs to be float

uniform int source_mip_level;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants