-
Notifications
You must be signed in to change notification settings - Fork 492
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
[d3d11] With DXVK d3d objects may become doubly wrapped leading to a crash #846
Comments
Something's amiss here, as DXVK should never have accessed apitrace's wrapper objects, therefore calls from DXVK back into apitrace should never have happened. 7fbc86b might workaround the issue, but it's papering over the root problem, whatever it may be. I see two possible explanations:
That said, I think it would be good to have the warning from 7fbc86b , to easily diagnose the issue. |
The more I look at dxvk's source code, the more I belive explanation 1 is the right one. I suspect what's happening is that call DXVK is internally calling |
The issue is a bit earlier:
So internal to DXVK |
Adding |
I'll probably need to reproduce this myself. I don't understand though, why just these games are affected. If all D3D11InternalCreateDeviceAndSwapChain -> CreateDXGIFactory1 were affected then I'd expect this to happen all the time. Can you confirm how you're capturing this? You're capturing as described in https://github.com/apitrace/apitrace/wiki/WINE#pure-wine ? Or something different? |
@jrfonseca I'm just copying dxgi and d3d11 apitrace dlls near game's executable. |
Hmm, I wouldn't expect this approach to ever work. But indeed this is what's recommended on https://github.com/doitsujin/dxvk/wiki/Using-Apitrace#on-linux Please remove any apitrace DLL from the game directory, and try following the instructions on https://github.com/apitrace/apitrace/wiki/WINE#windows-native if you haven't already. Instead of d3d9.dll, you'll need to set |
Also note that https://github.com/doitsujin/dxvk/wiki/Using-Apitrace#on-linux also states:
That's probably what's going on. The DXVK DLLs interfere with apitrace wrappers, so it's better not to use both at the same time. |
Ok, I'll try. The method of dropping the dlls near executable worked for 2+ years, so I didn't expected it to fail this time =)
That's too cryptic of a warning (it's likely there to safeguard against embedding corrupted render results into the trace). In my case I don't try to capture any issue, but capture a trace to replay it on my arm board with Turnip driver in order to find issues in it. Anyway, I'll try to follow your instructions, if it helps I'll suggest an update to dxvk docs. |
The good part is that when following your guide there is no crash. The bad part is that there is only a black screen during the replay. The calls in both traces looks similar, with the difference that one lacks internal DXVK calls, but I probably missing something... |
I saw this issue when tried to capture "Resident Evil 3" and "Injustice 2" running on DXVK.
How it happens:
IDXGIDevice4::GetParent(IID_IDXGIAdapter)
WrapIDXGIDevice4::GetParent
is calleddxvk::D3D11DXGIDevice::GetParent
WrapIDXGIAdapter4::QueryInterface
QueryInterface
wraps object once, and thenWrapIDXGIDevice4::GetParent
wraps it for the second time.
I made a change to prevent the double wrapping of the objects, though not sure it's a good one: 7fbc86b
The text was updated successfully, but these errors were encountered: