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

Godot crashes if creating uniform sampler2D array when using compatibility/GLES3 renderer #76463

Closed
JohanAR opened this issue Apr 26, 2023 · 2 comments · Fixed by #75313
Closed

Comments

@JohanAR
Copy link
Contributor

JohanAR commented Apr 26, 2023

Godot version

Godot Engine v4.1.dev.custom_build (56253c3897b99966ee9e7469fd01e6152f8552ef)

System information

Fedora 37 KDE, RTX 3080

Issue description

As soon as one defines an array of sampler2D the editor crashes.

handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.dev.custom_build (56253c3897b99966ee9e7469fd01e6152f8552ef)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x3cb20) [0x7f4c0d2a5b20] (??:0)
[2] GLES3::SceneMaterialData::bind_uniforms() (/storage/Code/godot/drivers/gles3/storage/material_storage.cpp:3520)
[3] void RasterizerSceneGLES3::_render_list_template<(PassMode)4>(RasterizerSceneGLES3::RenderListParameters*, RenderDataGLES3 const*, unsigned int, unsigned int, bool) (/storage/Code/godot/drivers/gles3/rasterizer_scene_gles3.cpp:2273)
[4] RasterizerSceneGLES3::render_scene(Ref<RenderSceneBuffers> const&, RendererSceneRender::CameraData const*, RendererSceneRender::CameraData const*, PagedArray<RenderGeometryInstance*> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, PagedArray<RID> const&, RID, RID, RID, RID, RID, RID, int, float, RendererSceneRender::RenderShadowData const*, int, RendererSceneRender::RenderSDFGIData const*, int, RendererSceneRender::RenderSDFGIUpdateData const*, RenderingMethod::RenderInfo*) (/storage/Code/godot/drivers/gles3/rasterizer_scene_gles3.cpp:1928)
[5] RendererSceneCull::_render_scene(RendererSceneRender::CameraData const*, Ref<RenderSceneBuffers> const&, RID, RID, unsigned int, RID, RID, RID, RID, int, float, bool, RenderingMethod::RenderInfo*) (/storage/Code/godot/servers/rendering/renderer_scene_cull.cpp:3317 (discriminator 4))
[6] RendererSceneCull::render_camera(Ref<RenderSceneBuffers> const&, RID, RID, RID, Vector2, bool, float, RID, Ref<XRInterface>&, RenderingMethod::RenderInfo*) (/storage/Code/godot/servers/rendering/renderer_scene_cull.cpp:2590)
[7] RendererViewport::_draw_3d(RendererViewport::Viewport*) (/storage/Code/godot/servers/rendering/renderer_viewport.cpp:212 (discriminator 1))
[8] RendererViewport::_draw_viewport(RendererViewport::Viewport*) (/storage/Code/godot/servers/rendering/renderer_viewport.cpp:279)
[9] RendererViewport::draw_viewports() (/storage/Code/godot/servers/rendering/renderer_viewport.cpp:729)
[10] RenderingServerDefault::_draw(bool, double) (/storage/Code/godot/servers/rendering/rendering_server_default.cpp:92)
[11] RenderingServerDefault::draw(bool, double) (/storage/Code/godot/servers/rendering/rendering_server_default.cpp:397)
[12] Main::iteration() (/storage/Code/godot/main/main.cpp:3234)
[13] OS_LinuxBSD::run() (/storage/Code/godot/platform/linuxbsd/os_linuxbsd.cpp:889)
[14] ./bin/godot.linuxbsd.editor.dev.x86_64(main+0x15a) [0x4f6d540] (/storage/Code/godot/platform/linuxbsd/godot_linuxbsd.cpp:75)
[15] /lib64/libc.so.6(+0x27510) [0x7f4c0d290510] (??:0)
[16] /lib64/libc.so.6(__libc_start_main+0x89) [0x7f4c0d2905c9] (??:0)
[17] ./bin/godot.linuxbsd.editor.dev.x86_64(_start+0x25) [0x4f6d325] (??:?)
-- END OF BACKTRACE --
================================================================
[1]    15524 IOT instruction (core dumped)  ./bin/godot.linuxbsd.editor.dev.x86_64 

Steps to reproduce

  1. Set renderer to "Compatibility"
  2. Write the following line in a shader that is assigned to an object through a ShaderMaterial (I've tried it in Spatial and Sky shaders)
    uniform sampler2D test[5];

Minimal reproduction project

N/A

@bitsawer
Copy link
Member

Will be possibly fixed by #75313.

@JohanAR
Copy link
Contributor Author

JohanAR commented Apr 26, 2023

Will be possibly fixed by #75313.

As far as I can tell by just reading the code, it looks like it would fix this.

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