-
Notifications
You must be signed in to change notification settings - Fork 777
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
D3D9: Copy only dirty regions #1987
Conversation
5f668e1
to
2e31250
Compare
Mass Effect is crashing so hard and badly for me with the last commit (950M, 461.92 and 465.89) that if it happens when I have MSI afterburner open, my whole pc shuts down too. EDIT: I could get this meagre log, but it's not very much useful |
cbb21df
to
90ffcb3
Compare
@mirh Don't use MSI Afterburner with DXVK. It's broken and known to cause issues. That said, there were bugs in the PR that are fixed now. |
The crash was there even without overlays, that only transformed it in an entire system lock. |
In Everquest 2 these new patch causes some texture issues. Edit: |
@Wishbringer71 Can you make an apitrace of Everquest 2? Doesn't matter whether you use the PR, regular DXVK or WineD3D for that. |
I am not familar with apitrace Did a "apitrace trace -a d3d9 everquest2.exe" and got around 18 GB for 5 minutes ingame. |
You'd usually just drop the 32bit apitrace wrapper d3d9.dll next to the games exe file. Your approach works too. Large files are to be expected. 18GB is on the larger side but not entirely unheard of. I don't need you to run it for 5 minutes either. Anything between 30s and 2 minutes should do the trick. On top of that, trace files can usually be compress very well. |
@K0bin Edit: |
That's not a problem. Even if you can't reproduce the issue while making the trace, I will be able to when I replay the trace with DXVK afterwards.
Don't do that. That's a bad idea and might potentially break your Windows installation. If your original method worked for you, you can just do it that way again. That's perfectly fine too. |
@K0bin |
@Wishbringer71 The Everquest 2 issue is also present on master and I can even reproduce it with 1.8.1 and 1.7.3. So it seems like its not caused by this PR. I'll look into it nonetheless. |
@K0bin |
3a2343e
to
846f870
Compare
Split it up into smaller commits. |
@Wishbringer71 Are you sure it works on DXVK master? I can reproduce the problem using your trace all the way back to DXVK 1.5.5. That's just the oldest version I've tested. |
@K0bin I had your bug years ago with an RX 580 and too high vram clocks. |
Someone reported another problem with it on Discord.
|
Fixed. |
@DadSchoorse atm I use dxvk on windows only to escape d3d9 issues with AMD drivers for RX 5700XT (wrong anisotropy and washed out textures) |
I smell an amdvlk issue coming here 🙄 |
1a080dd
to
43a4e94
Compare
Sry that I have to keep bothering you but I'd like to fix this and I can't reproduce it locally. Just put both of them into the Everquest 2 folder right next to the exe file and start the game. |
@K0bin |
The Everquest 2 issue appears to be a driver bug. Someone else tested that exact same spot with this PR and it was fine. |
@K0bin Issue is there with AMD Radeon Adrenaline drivers 21.2.3 - 21.3.2 at RX5700XT and RX550. |
And always maintain dirty range.
7d005e9
to
ceedc40
Compare
@K0bin |
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.
Looks fine upon initial review, I am sure we will find edgecases down the line :-)
I think i might have just found one of those... With Star Wars - The Old Republic, although not with "Dirty Regions" but rather "Use staging buffer for managed copies" 4261ff6 I run SWTOR through steam, and upon last Proton6.3-5 update, dxvk got updated to 1.9 and the "stutter out of hell" problem happened. Reverting DXVK to 1.8.1 i have no issues. Bisecting this, it started happening at the above linked commit. It is a bit better on 1.9+GIT, as when i turn around it stutters for 10-20 seconds and seems to even out.. until i move forward a bit and stuttering starts again. Can you work with a apitrace from windows? (Saw a link above with d3d9.dll and d3d9_dxvk.dll posted)... as i think i need a "for-dummies" explanation if i should get this working from proton... If so, ill create a new issue for this, since source has changed quite a bit since this PR. |
A Windows apitrace works fine, doesnt even have to be made with DXVK and yes, pls also open a separate issue. This is pretty weird though. If anything the changes should reduce stuttering. I'll have to investigate that. |
This has a number of advantages over the current approach:
This is significant in Nostale which keeps reusing a single 512x512 managed texture and writes data into it before every draw call. The data written is usually just ~60x60px so we only have to copy that instead of the whole 512x512 texture over and over again.
Nine (or rather Radeonsi) also does it this way. The downside is, that games that only lock and write their managed textures once might need more memory/address space and might load a bit slower. We copy the entire texture for textures that need to be converted in a compute shader because it seemed a bit painful to only copy the dirty parts there. I don't think that's a big deal anyway.
I'm rather scared of this, so it's gonna need a lot of testing.