On Mon Nov 20 05:55:43 2023 +0000, Nikolay Sivov wrote:
I don't know if it ever does on Windows, maybe in service session or something similar that can't create windows. For us, this is fixing test crashes. We already have the same check for d3d9 tests.
It probably can't on modern Windows; D3D_SDK_VERSION is essentially fixed at this point, and you pretty much always have WARP. That wasn't always true though. I'm not completely sure what the behaviour is supposed to be on a system with 0 d3d9 adapters; it's possible Direct3DCreate9() fails in those cases, but I could also imagine e.g. IDirect3D9_EnumAdapterModes() just failing with D3DADAPTER_DEFAULT in those cases.
Note that in principle there's no reason D3D/GL/Vulkan couldn't work with the NULL driver though. For OpenGL in particular, EGL works without a running X server, and I imagine that's what we'll end up using for Wayland anyway.