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

Windows PC without Vulkan or OpenGL should default to Direct3D12 #94760

Closed
panreyes opened this issue Jul 25, 2024 · 5 comments · Fixed by #94796
Closed

Windows PC without Vulkan or OpenGL should default to Direct3D12 #94760

panreyes opened this issue Jul 25, 2024 · 5 comments · Fixed by #94796

Comments

@panreyes
Copy link

Tested versions

  • Reproducible in Godot 4.3-rc1 for Windows x64 and arm64

System information

Windows 11 (ARM64) - Godot 4.3-rc1

Issue description

I have a Windows 11 ARM64 laptop (Samsung Galaxy Book Go) that Qualcomm decided to only give it DirectX support.

It might be a good idea to have this workflow for deciding automatically which rendering driver should Godot use when starting the editor or a game:

  • Method: If one is not available, check the next one. If it's not the recommended one (project is forward+, only opengl3 is available), just give a warning instead of exiting.
  • Driver priorities (native, most performant, compatibility): Vulkan, Direct3D12, OpenGL3, ANGLE.

Although I'm just posting this strange case anyone would like to check it, but I believe it should have the lowest priority, as these devices currently are just residual.

PS: Congrats to the team on the recent progresses on Direct3D and Windows on ARM! 👏🥳

Steps to reproduce

  • When I start the editor (4.3-rc1 x64), Godot detects that the laptop doesn't support OpenGL and uses the ANGLE backend for the project selector dialog.
    Captura de pantalla 2024-07-25 234422

  • When I select a project that uses the Forward+ renderer, it says that Vulkan is unavailable and that I should force the compatible opengl3 driver:
    Captura de pantalla 2024-07-25 234623

  • If I enforce the d3d12 rendering driver, it seems to initialize correctly for the project manager and I can get into the editor after that:
    Captura de pantalla 2024-07-25 235217

  • I got to export a game with the ARM64 template, but when trying to run the standalone game, this message appeared once more:
    Captura de pantalla 2024-07-25 235756

  • But after enforcing the d3d12 driver for the standalone executable, it worked and performed as expected. It was nice to see Arm64 as the executable architecture in the process list:
    Captura de pantalla 2024-07-26 000039

Minimal reproduction project (MRP)

"Game Base 2D" from the Assets library is good enough.

@akien-mga
Copy link
Member

CC @bruvzg - tentatively putting in 4.3 milestone if the fix is simple, but it's not critical, it can also wait for 4.4 and 4.3.x.

@Calinou
Copy link
Member

Calinou commented Jul 25, 2024

If you install the Vulkan/OpenGL support pack (which translates those APIs to Direct3D 12), you should be able to run the Compatibility rendering method.

@panreyes
Copy link
Author

Thanks for the good work! I just checked the artifact and I did not need to put any parameters to run the editor or the game.

Although I should mention that the editor used ANGLE instead of Direct3D, but the game used Direct3D when Forward+ was selected. No parameters were used when calling either the editor or running the game.

@kus04e4ek
Copy link
Contributor

kus04e4ek commented Jul 29, 2024

Although I should mention that the editor used ANGLE instead of Direct3D.

Do you mean when using the compatibility rendering method? It's expected as switching between different rendering methods might result in some issues so my PR didn't do it (you should open a proposal about it). If you meant Forward+ rendering methods, then did you restart your editor after switching rendering methods?

@panreyes
Copy link
Author

Do you mean when using the compatibility rendering method? It's expected as switching between different rendering methods might result in some issues so my PR didn't do it (you should open a proposal about it). If you meant Forward+ rendering methods, then did you restart your editor after switching rendering methods?

Nevermind, my mistake :)

This is what I did:

  • I opened the editor from a console enabled binary and noticed that it chose ANGLE as the renderer for the Godot Project manager window.
  • In that window, I opened a project that uses Forward+ as the default renderer.
  • I didn't see a second mention of renderer changing after opening the project, so I supposed it didn't change from ANGLE to Direct3D12
  • After checking a second time, I noticed that the editor, after opening the project from the project manager, stopped outputting to that stdout/stderr. Opening the project from command line (godot.exe -e --path projectfolder) let me see that Direct3D 12 is being used.

So, in the end:

  • ANGLE is still being used in the project manager.
  • Direct3D12 is used automatically as a replacement for Vulkan if Vulkan is unavailable.

I think this behaviour is good enough.

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.

4 participants