-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Regression: D3D11 fails with NoSuitableGraphicsDeviceException in Wine #199
Comments
Forgot to mention: the first bad commit is 508d572 |
This comment was marked as outdated.
This comment was marked as outdated.
Let me know if reporting this to Winehq would be appropriate. I'm kinda in over my head here. |
Looks like WineD3D is missing the SUPPORT_DISPLAY flags, which are required for some formats depending on the feature level: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb173064(v=vs.85) This will likely come up more often as HDR adoption in particular increases. |
Not sure if the WineHQ Bugzilla has a ticket yet, but I wrote a quick patch that would fix this for WineD3D: diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 061fd57fe09..bfe0a92f805 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -3960,6 +3960,32 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 *
| D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD;
}
+ if (feature_level >= D3D_FEATURE_LEVEL_9_1)
+ {
+ if (format == DXGI_FORMAT_R8G8B8A8_UNORM ||
+ format == DXGI_FORMAT_R8G8B8A8_UNORM_SRGB ||
+ format == DXGI_FORMAT_B8G8R8A8_UNORM ||
+ format == DXGI_FORMAT_B8G8R8A8_UNORM_SRGB)
+ {
+ *format_support |= D3D11_FORMAT_SUPPORT_DISPLAY;
+ }
+ }
+ if (feature_level >= D3D_FEATURE_LEVEL_10_0)
+ {
+ if (format == DXGI_FORMAT_R16G16B16A16_FLOAT ||
+ format == DXGI_FORMAT_R10G10B10A2_UNORM)
+ {
+ *format_support |= D3D11_FORMAT_SUPPORT_DISPLAY;
+ }
+ }
+ if (feature_level >= D3D_FEATURE_LEVEL_11_0)
+ {
+ if (format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM)
+ {
+ *format_support |= D3D11_FORMAT_SUPPORT_DISPLAY;
+ }
+ }
+
return *format_support ? S_OK : E_FAIL;
}
I'm sure the WineD3D team would want something more thorough/accurate-to-hardware but this at least covers the surface formats mandated by the D3D feature levels! |
They might be OK with a partial solution like this. |
Since we didn't have any other commits this month I went ahead and added a quick workaround that should make XNA games happy: We'll undo this when WineD3D is caught up! Will keep this issue open to track on our end. |
Thanks, it works so I just merged the update. At some point I'll file a Winehq bug and link it here. |
Filed a Winehq bug: https://bugs.winehq.org/show_bug.cgi?id=56383 |
Tested for merging into Wine Mono, but this most likely affects Wine generally. I used One Finger Death Punch to test.
Excerpt of terminal output:
So it's probably something with Wine's CheckFormatSupport stub.
The text was updated successfully, but these errors were encountered: