Dxvk: [d3d9] Dragon Age Origins Ultimate Edition "Save file image - black"

Created on 24 Jan 2020  路  26Comments  路  Source: doitsujin/dxvk

Hi, Dragon Age Origins runs perfect on my end, except there is a little issue with "save file images" (screen.dds).

When I run and save game with DXVK the save image is black.

DXVK
dao-black-save-file-picture

WineD3D
doe-wined3d-save-file-picture

Then I open "screen.dds" file I can clearly see the black image, but not with wined3d.

DXVK with GIMP
dao-save-file-with-gimp

WineD3D with GIMP
dao-gimp-good

How to test:
1) Run game with WineD3D and save game, in load menu image is OK.
2) Change to DXVK and go to load menu, image is OK (generated with WineD3D).
3) Now with DXVK enter the game and save, save file image - black.
4) Change back to WineD3D, goto load menu, and image is black (generated with DXVK).

Tried with winetricks d3dx9 didn't helped. And this issue exist on my end since "forever" early 0.1 build or something.

Software information

Dragon Age Origins Ultimate Edition

System information

  • GPU: nVidia GTX 960
  • Driver: 440.48.02
  • Wine version: 3.11-5.0
  • DXVK version: 1.5.1 (#1107 master 7469f5d4 )

Apitrace file(s)

https://drive.google.com/file/d/122c3pyr88fPC2dDUpM13AiAtbQTxcmod/view?usp=sharing

Log files

All 26 comments

The more interesting thing to trace would actually be creating a savegame, since all this really tells us is that the game loads a black texture (which is correct as you demonstrated).

Anyway, I have access to the game (not sure if @Joshua-Ashton does), so I can take a look.

Tried I tried both wine and d3dx9 from winetricks, and the result was the same - black image.
Also tried nvapi to disable, but didn't help either.

Yeah, a trace of you saving the game would be ideal. Then we can pick out the GetRenderTargetData/GetFrontBufferData call and see wtf went wrong

So to clarify, you want me to run the game on windows with dx9, do save and load, while doing apitrace?

Just save

OK.

So the problem is that the apitrace works completely fine. Apparently the game takes a different code path when running on DXVK vs wined3d for some reason, and figuring out what's going on is going to be hard.

I know I followed the conversation on discord. But thanks anyway.

load_game_dao
Not getting a black screen capture, but sort of the same problem I guess. Looks like a random memory dump to my untrained eyes.

If you need help testing/debugging this any further, I'm happy to help.

We already know what's going on, just not how to fix this without breaking other games since the behaviour of the functions involved is extremely poorly documented.

@doitsujin Can you elaborate about "what's going on", especially about how the GetRenderTargetData function is broken?

I'm getting this behavior in a game (runs on dx9) that uses GetRenderTargetData for fade transitions, which presumably due to this bug turns into fade-in from black. Looking at RenderDoc traces suggest that it might be a bad synchronization; although I haven't dug enough into dxvk so I can't be sure.

Turns out the issue in my case has been fixed in #1728. Maybe this one is worth getting retested?

1728 just fixed a regression introduced im 1.7.1. In that case 1.7.0 should've been fine too.

The problem still persist, unless I install manually official "directx_Jun2010_redist.exe".
So I guess, closing. :)

On my end it looks almost fixed, but not quite...

DAO

P.S.: Captured with 1.7.3, on an Nvidia card.

In case anyone is interested, I went through a few more saves, just to see what happens and got one of the following cases:
a) a fully garbled mess of pixels, as per my initial screenshot
b) a somewhat correct image with pixel mess on the side, as per the above screenshot
c) a 100% correct image (yey!), but one that captured the position I was in the game 10 seconds before saving

Did you install the microsoft d3dx redistributable?

Not explicitly, but it may have come with the game (don't remember to be honest). I don't have any other overrides except those set by dxvk, in any case. I don't even have the d3dx9 winetrick in this prefix, but I can also try with it installed, if you think it matters.

Please try that. It fixed the issue for dlshinobi so it's probably a bug with that and not DXVK.

Ups, my bad! I play for an hour and everything was fine. No problem with save thumbnails.
Then I quit the game, closed this issue.
Boot the game, and I'm getting garbage. But not all the time, it's fucking RANDOM.
Just save and load, save and load, ..... and you will get eventually a good result. So I guess it's not fixed.
hmm

Please try that. It fixed the issue for dlshinobi so it's probably a bug with that and not DXVK.

Well, you were right that it's not a DXVK bug... turns out WINEDLLOVERRIDES="d3dx9_36=b" actually fixed it for me. The game will only load d3dx9_36 out of the d3dx9 stuff.

With WINEDLLOVERRIDES="d3dx9_36=n" (the "directx_Jun2010_redist.exe" version) I get consistent black screens, as per dlshinobi's inital report.

The default of "b, n" sometimes gets me the weirdness described above.

@dlshinobi might want to try WINEDLLOVERRIDES="d3dx9_36=b", see if that fixes it for you (permanently :)

might want to try WINEDLLOVERRIDES="d3dx9_36=b", see if that fixes it for you (permanently :)

That's the default setting...

Yep, WINEDLLOVERRIDES="d3dx9_36=b did the trick. Now everything works fine.

might want to try WINEDLLOVERRIDES="d3dx9_36=b", see if that fixes it for you (permanently :)

That's the default setting...

You're not wrong, but the game seems to load whatever is in system32 otherwise... and if you've installed "directx_Jun2010_redist.exe", that's not the builtin version.

... or it might be that my wine prefix is a bit messed up by now. Either way, builtin version of said dll seems to work, no other tricks required.

Not DXVK bug, closing this time for real.

Was this page helpful?
0 / 5 - 0 ratings