I believe this is DXVK issue. DC render target is using D3D10_RESOURCE_MISC_GDI_COMPATIBLE and IDXGISurface1 to access GDI device context. I don't see anything about IDXGISurface support in d3d10/d3d11 2D textures in DXVK. However E_FAIL error code indicates it fails earlier, probably during texture creation.
Thanks, I'll try to collect more info like apitrace and file new bugreport on dxvk.
WINEDEBUG=+d2d and enabled DXVK logging (I don't know how that works), will already give some info.
Is there a game that needs this?
Setting PROTON_USE_WINED3D11=1 will use Wine's DXGI which is compatible with Wine's D2D, instead of DXVK's DXGI which isn't. See the README.
That was it. With PROTON_USE_WINED3D11 enabled, rendering is broken (black screen etc), but at least rendering target is available now and I can proceed with in-detail debugging.
Thanks a lot for all your help, guys. @nsivov could you please close the defect?
Closing per the last comment.
@ioncore I don't think it's that unreasonable to expect dxvk to provide necessary dxgi functionality, but up to you. What application was that by the way?
@nsivov we've recently got a customer bug report that our Windows game runs just fine on Linux (Steam/Proton), except few particular tools/features are missing (all of them are D2D-based). We are not officially supporting Proton yet, nor do we have any experience with that platform so far, so we may lack some basic knowledge with that domain (like DXVK DXGI turned out to be D2D-incompatible).
Before venturing further into DXVK we should first become fully compliant with Wine DXGI, I think.
Ok, makes sense. In that case please report any issues you find to bugs.winehq.org as well.
PROTON_USE_WINED3D11x1 2018-09PROTON_USE_WINED3D11=1x1 2018-09WINEDEBUG=+d2dx1 2018-090x80004005x1 2018-08
Issue transferred from https://github.com/ValveSoftware/steam-for-linux/issues/5716.
@ioncore posted on 2018-08-31T23:49:47:
Your system information
Please describe your issue in as much detail as possible:
Consider this snippet from MSDN:
ID2D1DCRenderTarget* mRenderTarget= nullptr;D2D1_RENDER_TARGET_PROPERTIES renderTargetProps = D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE_DEFAULT,D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM,D2D1_ALPHA_MODE_IGNORE),0, 0,D2D1_RENDER_TARGET_USAGE_NONE,D2D1_FEATURE_LEVEL_DEFAULT);HRESULT hr = D2DFactory->CreateDCRenderTarget( &renderTargetProps , &mRenderTarget);Under Windows it succeeds and returns a non-null render target. Under Proton it fails with error code 0x80004005 and returns null render target.
I've also written a small render target enumerator function which attempts to create render target for every single possible combination of params in the D2D1_RENDER_TARGET_PROPERTIES structure. When run under Windows, it returns 54 valid combinations (indeed, all are based on DXGI_FORMAT_B8G8R8A8_UNORM format). When run under Proton, there is no valid combinations at all (so a DC render target can not be created under Proton).
My lshw output is here.