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: Disabling V-Sync on Intel integrated graphics crashes the renderer #70837

Open
henriquelalves opened this issue Jan 2, 2023 · 5 comments

Comments

@henriquelalves
Copy link
Contributor

henriquelalves commented Jan 2, 2023

Godot version

4.0 (beta 10)

System information

Fedora, Intel(R) HD Graphics 5600 (BDW GT2)

Issue description

I'm developing a PoC for benchmarking the player's hardware and setting the graphic settings accordingly. When running it on a machine without GPU (only an Intel Integrated Graphics), the project renderer crashes on the line where the settings disable the DisplayServer VSync (Godot throws an error, and the screen stays black. The project does not close, though).

Steps to reproduce

This only happens when VSync is set "Enabled" on Project Settings and is set to disabled with DisplayServer.window_set_vsync_mode(). I can't reproduce this issue on a machine with GPU.

Minimal reproduction project

https://github.com/GDQuest/3D-graphics-benchmark-PoC

@Calinou Calinou changed the title Disabling VSync on integrated graphics crashes the renderer Vulkan: Disabling V-Sync on Intel integrated graphics crashes the renderer Jan 2, 2023
@Calinou
Copy link
Member

Calinou commented Jan 2, 2023

Can you reproduce this after switching to the Compatibility (OpenGL) rendering backend in the project settings?

@Calinou Calinou added this to the 4.0 milestone Jan 2, 2023
@henriquelalves
Copy link
Contributor Author

I'll need to take a look again. I just updated my Fedora drivers after finding this Issue to use its GPU instead of Integrated Graphics, and now I can't disable it as easy as in Pop_OS.

@ahopness
Copy link

ahopness commented Jan 31, 2023

Can you reproduce this after switching to the Compatibility (OpenGL) rendering backend in the project settings?

tested on my laptop, turning of vsync on gl_compatibility works fine, this bug only happens on both Mobile and Foward+ rendering devices

the error that is printed on debugger when vsync is turned off: (last 2 lines can be ignored)

E 0:00:11:0960   scrManager.gd:151 @ apply_settings(): Condition "swapchainImageCount != sp_image_count" is true. Returning: ERR_BUG
  <C++ Source>   drivers/vulkan/vulkan_context.cpp:1967 @ _update_swap_chain()
  <Stack Trace>  scrManager.gd:151 @ apply_settings()
                 scrManager.gd:249 @ _on_chkbtn_vsync_toggled()

@Dragoncraft89
Copy link
Contributor

I have the same issue with AMD Radeon Graphics (RADV RENOIR) on 4.1.1

Although the issue only seems to appear on Wayland. I cannot produce the crash on X11. @henriquelalves I think Fedora uses Wayland by default. Can you confirm?

I use sway as my window manager on wayland, in case its related.

I ran the back trace through gdb and it crashes on VulcanContext::_cleanup_swap_chain. This is nearly the same back trace as in #64766 with the only difference being that _update_swap_chain is called by set_vsync_mode instead of prepare_buffers

Therefore this is likely a duplicate of #64766

@Calinou
Copy link
Member

Calinou commented Jul 23, 2023

Therefore this is likely a duplicate of #64766

The MRP linked in OP doesn't use multi-threaded rendering.

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