-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Verify if the adapter is available in RenderingContextDriverD3D12::_initialize_devices
#112293
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
base: master
Are you sure you want to change the base?
Verify if the adapter is available in RenderingContextDriverD3D12::_initialize_devices
#112293
Conversation
af3296a to
ebf4ea4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code make sense to me, but the device initialization process warrants a refactor to fix #98207 anyway, which would also naturally handle your issue. It's better if we can avoid the D3D12 runtime validating the adapter twice.
It appears that some functionalities can only be verified after the device is created. The solutions are either to move the actual logic of device initialization to So, should I close this PR and wait for the refactoring, or can we merge this PR first and then proceed with the refactoring? |
|
It can stay open, I'm still planning how to go with the refactor. |
I hope to complete this as soon as possible, as several users have reported that they cannot run my application because their computers do not support DirectX 12. |
Devices that only support D3D12 should automatically fall back from OpenGL to ANGLE. Do you have any more information about those devices so we could investigate further? I am assuming they are Snapdragon based ARM laptops? |
In fact, that user has an x86-64 Windows 10 computer with an |
Fix #112282
According to Microsoft's documentation, when the
ppDeviceparameter ofD3D12CreateDeviceisnull, it can verify whether a device can be created without actually creating one. Therefore, it should be possible to use this method to determine if an adapter is truly available.Although I'm not entirely sure if my code is correct, I have conducted simple tests on both a Windows 11 virtual machine and a physical machine. Now, it correctly triggers rendering fallback in the virtual machine, and the physical machine can also use
d3d12normally.It's still uncertain what impact this has on performance.