Skip to content

Unable to properly trigger rendering fallback when using d3d12. #112282

@scgm0

Description

@scgm0

Tested versions

4.6 master

System information

Windows 11

Issue description

When the rendering/rendering_device/fallback_to_opengl3 is enabled in the project settings, if d3d12 is used by default, the fallback cannot be triggered properly.

Image

The screenshot is from my Windows virtual machine, and some of my users have also reported this issue to me.

By examining the source code and conducting some tests, I believe the issue lies with RenderingContextDriverD3D12::initialize() not being robust enough. It returns OK even on devices that do not support D3D12, which prevents the fallback-related code from running at all.
In contrast, RenderingContextDriverVulkan::initialize() fails properly in a virtual machine, thereby triggering the fallback mechanism.
Image

Steps to reproduce

  1. In the project settings, set rendering_device/driver.windows to d3d12, and ensure that rendering/rendering_device/fallback_to_opengl3 is true.
  2. Export the project and run it on a Windows device or virtual machine that does not support d3d12.

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions