godot: Godot 4 build with doubles crashes Mesa RADV Radeon drivers on launch (works with AMDVLK, fixed in Mesa 22.3)

Godot version

4.0.dev (499eec1)

System information

Arch linux with amd 5700 xt

Issue description

Crashes with the following backtrace

./bin/godot.linuxbsd.double.opt.tools.64                                         INT ↵
Godot Engine v4.0.alpha.custom_build.6a51999b7 - https://godotengine.org
ERROR: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
	loader_scanned_icd_add: Driver /usr/lib/libvulkan_radeon.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
	Objects - 1
		Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 94548984335344
   at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:157)
Vulkan API 1.2.203 - Using Vulkan Device #0: AMD - AMD RADV NAVI10

================================================================
handle_crash: Program crashed with signal 8
Engine version: Godot Engine v4.0.alpha.custom_build (6a51999b7f4d9f7b1f950d7a655a464f28542318)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x42560) [0x7fc37ca18560] (??:0)
[2] /usr/lib/libvulkan_radeon.so(+0x1ed79e) [0x7fc37abd379e] (??:0)
[3] /usr/lib/libvulkan_radeon.so(+0x1eef5e) [0x7fc37abd4f5e] (??:0)
[4] /usr/lib/libvulkan_radeon.so(+0x1ef058) [0x7fc37abd5058] (??:0)
[5] ./bin/godot.linuxbsd.double.opt.tools.64(+0x1a24537) [0x55fddfb84537] (??:0)
[6] ./bin/godot.linuxbsd.double.opt.tools.64(+0x3b54aef) [0x55fde1cb4aef] (??:0)
[7] ./bin/godot.linuxbsd.double.opt.tools.64(+0xd49267) [0x55fddeea9267] (??:0)
[8] ./bin/godot.linuxbsd.double.opt.tools.64(+0x3b19830) [0x55fde1c79830] (??:0)
[9] ./bin/godot.linuxbsd.double.opt.tools.64(+0xd23282) [0x55fddee83282] (??:0)
[10] /usr/lib/libc.so.6(+0x2d310) [0x7fc37ca03310] (??:0)
[11] /usr/lib/libc.so.6(__libc_start_main+0x81) [0x7fc37ca033c1] (??:0)
[12] ./bin/godot.linuxbsd.double.opt.tools.64(+0xd3fdf5) [0x55fddee9fdf5] (??:0)
-- END OF BACKTRACE --
================================================================
[1]    77475 IOT instruction (core dumped)  ./bin/godot.linuxbsd.double.opt.tools.64

With a debug build

Vulkan API 1.2.203 - Using Vulkan Device #0: AMD - AMD RADV NAVI10

================================================================
handle_crash: Program crashed with signal 8
Engine version: Godot Engine v4.0.alpha.custom_build (3f3826edb8a3b5ea137dbe5a167e3b9336181551)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x42560) [0x7f211aa7d560] (??:0)
[2] /usr/lib/libvulkan_radeon.so(+0x1ed98e) [0x7f2118c7798e] (??:0)
[3] /usr/lib/libvulkan_radeon.so(+0x1ef14e) [0x7f2118c7914e] (??:0)
[4] /usr/lib/libvulkan_radeon.so(+0x1ef248) [0x7f2118c79248] (??:0)
[5] RenderingDeviceVulkan::render_pipeline_create(RID, long, long, RenderingDevice::RenderPrimitive, RenderingDevice::PipelineRasterizationState const&, RenderingDevice::PipelineMultisampleState const&, RenderingDevice::PipelineDepthStencilState const&, RenderingDevice::PipelineColorBlendState const&, int, unsigned int, Vector<RenderingDevice::PipelineSpecializationConstant> const&) (??:0)
[6] RendererCanvasRenderRD::RendererCanvasRenderRD(RendererStorageRD*) (??:0)
[7] RendererCompositorRD::RendererCompositorRD() (??:0)
[8] RendererCompositorRD::_create_current() (??:0)
[9] RendererCompositor::create() (??:0)
[10] RenderingServerDefault::RenderingServerDefault(bool) (??:0)
[11] Main::setup2(unsigned long) (??:0)
[12] Main::setup(char const*, int, char**, bool) (??:0)
[13] ./godot.linuxbsd.double.tools.64(main+0x134) [0x55be1781eb3d] (??:0)
[14] /usr/lib/libc.so.6(+0x2d310) [0x7f211aa68310] (??:0)
[15] /usr/lib/libc.so.6(__libc_start_main+0x81) [0x7f211aa683c1] (??:0)
[16] ./godot.linuxbsd.double.tools.64(_start+0x25) [0x55be17214655] (??:0)
-- END OF BACKTRACE --
================================================================
[1]    74981 IOT instruction (core dumped)  VK_ICD_FILENAMES= ./godot.linuxbsd.double.tools.64

If more info is needed, please tell me how. I’ll need some hand holding.

Steps to reproduce

Build script: scons -j12 warnings=all werror=yes platform=linuxbsd tools=yes tests=no production=yes float=64 target=release_debug

Minimal reproduction project

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 15 (6 by maintainers)

Most upvoted comments

According to https://gitlab.freedesktop.org/mesa/mesa/-/issues/7528#note_1619087, Mesa 22.3 should fix this by supporting 64-bit vertex buffer formats in RADV. It’s now released in stable form, so (half-)rolling release distributions should have it by now.

Unfortunately, Mesa 22.3 may not be backported to all LTS Linux distributions. Ubuntu generally backports Mesa updates as part of its hardware enablement stack, but in other distributions, you’ll have to use third-party repositories to get up-to-date graphics drivers. This could affect Debian stable and CentOS desktops in particular.

I have a feeling this is caused by us using real_t with shader structs. While working on particles I noticed a few Uniform Buffers had been changed from floats to real_t, which would cause alignment issues on doubles builds.

Stuff like this: https://github.com/godotengine/godot/blob/2f0d3d5424c393c756f4cd5cac26287c95aaf4fe/servers/rendering/renderer_rd/storage_rd/particles_storage.h#L100

scale was turned into a real_t on the engine side, but it is still a float in the shader. There are a bunch of others in the particles uniforms, and I imagine there are other similar issues elsewhere.

Of course, without an MRP I can’t say whether this contributes to the crash or not, it is just a hunch I have

Please report this to Mesa developers, as this is a third-party driver issue.

I tried to switch to amdvlk. It’s working now. I guess it’s driver’s issue.

It is a warning in the driver loader. It will go away when mesa catches up. It (should be) is unrelated to the crash

On Thu, Feb 24, 2022, 2:40 PM Nikolaos Katomeris @.***> wrote:

Not sure if it affects the crash but regarding the loader_scanned_icd_add: Driver /usr/lib/libvulkan_radeon.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7 part.

I was hitting that also on arch and happened after a vulkan-icd-loader update. To fix I had to downgrade to version 1.2.199-2 from the pacman’s caches.

After the downgrade it disappeared from the warning in Godot 4. Could reproduce it without running godot though - just by running vulkaninfo.

If that affects the crash then the issue is probably not godot related, but again, it may be unrelated to the crash.

— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/58333#issuecomment-1050332467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5V52CSTTZ66G4GZ7VJZ3U42XVJANCNFSM5O3VUC4Q . You are receiving this because you authored the thread.Message ID: @.***>