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

Incorrect fallback to Direct3D 12 on Vulkan-unsupported device #98848

Open
dsd opened this issue Nov 5, 2024 · 3 comments
Open

Incorrect fallback to Direct3D 12 on Vulkan-unsupported device #98848

dsd opened this issue Nov 5, 2024 · 3 comments

Comments

@dsd
Copy link

dsd commented Nov 5, 2024

Tested versions

  • Reproducible in v4.3.stable.official.77dcf97d8 and v4.4 dev 3

System information

Windows, Intel 4600 graphics

Issue description

When opening an existing project that is set to use the Forward+ renderer, these errors occur on this device:

Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
OpenGL API 3.3.0 - Build 20.19.15.5126 - Compatibility - Using Device: Intel - Intel(R) HD Graphics 4600

Project is missing: D:/CURSOS/UTP/ENDLESS/GAME MAKING/path-to-the-throne/godot/project.godot
Editing project: D:/CURSOS/UTP/ENDLESS/Game Maiking/path-to-the-throne/godot
Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
WARNING: Your video card drivers seem not to support Vulkan, switching to Direct3D 12.
     at: DisplayServerWindows (platform/windows/display_server_windows.cpp:5985)
D3D12 11_0 - Forward+ - Using Device #0: Intel - Intel(R) HD Graphics 4600
WARNING: PSO caching is not implemented yet in the Direct3D 12 driver.
     at: pipeline_cache_create (drivers/d3d12/rendering_device_driver_d3d12.cpp:4906)
ERROR:ERROR: Shader translation at stage Compute failed.
 Shader translation at stage Compute failed.
   at: ERROR:(drivers/d3d12/rendering_device_driver_d3d12.cpp:3289)

After this, several hundred more gfx-related errors appear in the logs, with the Godot editor window fully black. After a few seconds the window goes away with this crash:

================================================================
CrashHandlerException: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] error(-1): no debug info in PE/COFF executable
[2] error(-1): no debug info in PE/COFF executable
[3] error(-1): no debug info in PE/COFF executable
[4] error(-1): no debug info in PE/COFF executable
[5] error(-1): no debug info in PE/COFF executable
[6] error(-1): no debug info in PE/COFF executable
[7] error(-1): no debug info in PE/COFF executable
[8] error(-1): no debug info in PE/COFF executable
[9] error(-1): no debug info in PE/COFF executable
[10] error(-1): no debug info in PE/COFF executable
[11] error(-1): no debug info in PE/COFF executable
[12] error(-1): no debug info in PE/COFF executable
[13] error(-1): no debug info in PE/COFF executable
[14] error(-1): no debug info in PE/COFF executable
[15] error(-1): no debug info in PE/COFF executable
[16] error(-1): no debug info in PE/COFF executable
[17] error(-1): no debug info in PE/COFF executable
[18] error(-1): no debug info in PE/COFF executable
[19] error(-1): no debug info in PE/COFF executable
[20] error(-1): no debug info in PE/COFF executable
-- END OF BACKTRACE --
================================================================

Intel 4600 does not support Vulkan nor Direct3D 12 on Windows.

The same thing happens in Godot 4.4 dev 3. (Sorry I did not capture logs from 4.4)
However, Godot 4.4 will not allow me to create a new project with Forward+ because it detects the lack of gfx support. That's a great addition!

Can something similar be applied to opening of existing projects? In this case, I would expect Godot to either give me a friendly error message saying that it can't open the project because of incompatible renderer, or for it to automatically fall back to Compatibility renderer (perhaps with some notification of this).

I see some type of fallback has been implemented via godotengine/godot-proposals#8006 but it seems not to be working in this case.

Steps to reproduce

  1. Open Godot project manager
  2. Open any existing project that uses Forward+ renderer
dsd added a commit to GameNova-Studio/path-to-the-throne that referenced this issue Nov 5, 2024
Ayer investigue el problema visto por @KathFlores que no podia abrir
el proyecto.

Su computadora no tiene soporte para Vulkan ni Direct3D 12, entonces
no se puede usar el renderizador Forward+, y Godot no tiene un fallback
para este caso: godotengine/godot#98848

Usar el renderizador Compatibilidad para este proyecto para poder
trabajar bien en computadoras así.
@bruvzg
Copy link
Member

bruvzg commented Nov 6, 2024

I see some type of fallback has been implemented via godotengine/godot-proposals#8006 but it seems not to be working in this case.

D3D12 11_0 - Forward+ - Using Device #0: Intel - Intel(R) HD Graphics 4600

The problem with current fallback system, it is done in an early stage of renderer initialization, and only works if API is completely missing (e.g, DX12→GL should work on Windows 7). Windows 10+ always have some level of DX12 support. It's running with 11.0 feature level, which is insufficient for Godot, but renderer init still works, and fallback doesn't trigger.

@lrahmann
Copy link

lrahmann commented Nov 6, 2024

Godot can work with DX12 11_* as long as they support SM6.1 (some older Intel GPUs actually do this and their Vulkan support is not that good anyway).
The issue at hand here is #98207 but I currently do not have the time to do a proper pull request for this one. Older SM cannot be supported due with the approach Godot took for DirectX support.

@dsd
Copy link
Author

dsd commented Nov 6, 2024

Thanks for the context.

On this device, Godot 4.4 refuses to create a new project with Forward+. Does that imply there is a codepath there that is detecting that D3D12 is not usable? If so, I wonder if we can use it (or get inspiration from it) here.

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

4 participants