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

Vulkan error stops Godot 4.3 editor from starting #96284

Closed
tobydjones opened this issue Aug 29, 2024 · 6 comments
Closed

Vulkan error stops Godot 4.3 editor from starting #96284

tobydjones opened this issue Aug 29, 2024 · 6 comments

Comments

@tobydjones
Copy link

tobydjones commented Aug 29, 2024

Tested versions

In 4.1 and 4.2 I get an error popup, then the Godot engine stops responding
In 4.3, no error popup, the engine doesn't stop responding, it just doesn't load (edit: the editor doesn't load, I just see a blank grey screen)

System information

Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - AMD Radeon RX 6600 (Advanced Micro Devices, Inc.; 31.0.24033.1003) - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 Threads)

Issue description

I tried to adapt someone's RTS demo to use wss, but somehow I made Godot stop working.
When I try to load this project, the Godot engine doesn't load (edit: the editor doesn't load, I just see a blank grey screen). In the console I get this error:

Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
OpenGL API 3.3.0 Core Profile Context 24.5.1.240502 - Compatibility - Using Device: ATI Technologies Inc. - AMD Radeon RX 6600

Editing project: C:/Users/Toby/Documents/Godot 4 Dev/networking/Godot-webrtc-demos-main (4.3) - supposed to have WebRTCMultiplayer but error/multiplayer_bomber
Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
Vulkan 1.3.277 - Forward+ - Using Device #0: AMD - AMD Radeon RX 6600
ERROR: Condition "err != OK" is true.
   at: _initialize_cache (servers/rendering/renderer_rd/shader_rd.cpp:771)
(repeated 5 times)
ERROR: Condition "err != VK_SUCCESS" is true. Returning: ERR_CANT_CREATE
   at: swap_chain_resize (drivers/vulkan/rendering_device_driver_vulkan.cpp:2718)
(repeated indefinitely)

Steps to reproduce

Unpack the MRP, start Godot 4.3 using console, and try to load project

Minimal reproduction project (MRP)

Godot-webrtc-demos-main (4.3) - supposed to have WebRTCMultiplayer but error.zip

@tobydjones
Copy link
Author

tobydjones commented Aug 29, 2024

When I ran in Godot 4.2, I got the popup "Unable to initialise Vulkan video driver". At the bottom of that, it recommended rebooting if I'd updated by drivers. Well, I hadn't, but I rebooted anyway, and now everything works again (?)
But that still leaves the problem that I had that if Vulkan can't be initialised, in 4.3, it generates the same error indefinitely.
vulkan error

@fire fire changed the title error with Vulkan stops Godot 4.3 from starting Vulkan error stops Godot 4.3 from starting Aug 29, 2024
@tropical32
Copy link

I have this exact issue in 4.3 with RX 6400. Everything is fine until I set anti-aliasing to 8x and enlarge the window to 4K. The game is practically unplayable in 4.3 with higher settings. The game crashes when shadows are enabled and AA is changed from 4x to 2x.

It crashes the game after a while with these errors:

ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: All attachments unused.
   at: (servers/rendering/rendering_device.cpp:2316)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_data (servers/rendering/renderer_rd/framebuffer_cache_rd.h:171)
ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: Parameter "src_tex" is null.
   at: texture_clear (servers/rendering/rendering_device.cpp:1855)
ERROR: Condition "named_texture.texture.is_null()" is true. Returning: RID()
   at: get_texture_slice_view (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:440)
ERROR: Texture (binding: 0, index 0) is not a valid texture.
   at: (servers/rendering/rendering_device.cpp:2875)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (servers/rendering/renderer_rd/uniform_set_cache_rd.h:130)
ERROR: Parameter "uniform_set" is null.
   at: compute_list_bind_uniform_set (servers/rendering/rendering_device.cpp:4392)

@tobydjones
Copy link
Author

I have this exact issue in 4.3 with RX 6400. Everything is fine until I set anti-aliasing to 8x and enlarge the window to 4K. The game is practically unplayable in 4.3 with higher settings. The game crashes when shadows are enabled and AA is changed from 4x to 2x.

It crashes the game after a while with these errors:

ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: All attachments unused.
   at: (servers/rendering/rendering_device.cpp:2316)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_data (servers/rendering/renderer_rd/framebuffer_cache_rd.h:171)
ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: Parameter "src_tex" is null.
   at: texture_clear (servers/rendering/rendering_device.cpp:1855)
ERROR: Condition "named_texture.texture.is_null()" is true. Returning: RID()
   at: get_texture_slice_view (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:440)
ERROR: Texture (binding: 0, index 0) is not a valid texture.
   at: (servers/rendering/rendering_device.cpp:2875)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (servers/rendering/renderer_rd/uniform_set_cache_rd.h:130)
ERROR: Parameter "uniform_set" is null.
   at: compute_list_bind_uniform_set (servers/rendering/rendering_device.cpp:4392)

I don't think this is the same issue. For me the editor wouldn't start, and I just had one error repeated indefinitely.

@tobydjones tobydjones changed the title Vulkan error stops Godot 4.3 from starting Vulkan error stops Godot 4.3 editor from starting Aug 30, 2024
@tropical32
Copy link

tropical32 commented Aug 30, 2024

I have this exact issue in 4.3 with RX 6400. Everything is fine until I set anti-aliasing to 8x and enlarge the window to 4K. The game is practically unplayable in 4.3 with higher settings. The game crashes when shadows are enabled and AA is changed from 4x to 2x.
It crashes the game after a while with these errors:

ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: All attachments unused.
   at: (servers/rendering/rendering_device.cpp:2316)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_data (servers/rendering/renderer_rd/framebuffer_cache_rd.h:171)
ERROR: vmaCreateImage failed with error -2.
   at: (drivers/vulkan/rendering_device_driver_vulkan.cpp:1518)
ERROR: Condition "!texture.driver_id" is true. Returning: RID()
   at: texture_create (servers/rendering/rendering_device.cpp:781)
ERROR: Attempted to name invalid ID: 0
   at: set_resource_name (servers/rendering/rendering_device.cpp:5001)
ERROR: Condition "p_named_texture.texture.is_null()" is true.
   at: update_sizes (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:84)
ERROR: Parameter "src_tex" is null.
   at: texture_clear (servers/rendering/rendering_device.cpp:1855)
ERROR: Condition "named_texture.texture.is_null()" is true. Returning: RID()
   at: get_texture_slice_view (servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp:440)
ERROR: Texture (binding: 0, index 0) is not a valid texture.
   at: (servers/rendering/rendering_device.cpp:2875)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (servers/rendering/renderer_rd/uniform_set_cache_rd.h:130)
ERROR: Parameter "uniform_set" is null.
   at: compute_list_bind_uniform_set (servers/rendering/rendering_device.cpp:4392)

I don't think this is the same issue. For me the editor wouldn't start, and I just had one error repeated indefinitely.

well, in that case this is a broader issue than just the editor. When I run the game (the executable, without the editor), it points to the exact same line as in your case:

ERROR: Condition "err != VK_SUCCESS" is true. Returning: ERR_CANT_CREATE
   at: swap_chain_resize (drivers/vulkan/rendering_device_driver_vulkan.cpp:2718)

@Zireael07
Copy link
Contributor

@tropical32 ERR_CANT_CREATE can happen in a lots of places due to lots of causes

@Calinou
Copy link
Member

Calinou commented Aug 31, 2024

Thanks for the report! Consolidating in godotengine/godot-proposals#8006.

Haswell IGPs do not have Vulkan support, so you must use the Compatibility rendering method. The Web export always uses Compatibility anyway, so it's recommended to also use it on desktop so your project looks as close as possible to the web export while in the editor.

In the meantime, you can force an existing project to use the Compatibility rendering method by adding this at the bottom of its project.godot file:

[rendering]

renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"

(If a rendering section already exists in project.godot, Godot will merge it automatically when the project is saved.)

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

No branches or pull requests

5 participants