doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.09k stars 840 forks source link

Taking a screenshot issue #1397

Closed spajdrEX closed 4 years ago

spajdrEX commented 4 years ago

Hello, I'm new to DXVK and the biggest issue, for now, is that if I try to take a screenshot via PrtScrn button or F12, alternatively via Radeon Software - CTRL + SHIFT + E it's always saved as a smaller white window, rest is black. Game is Assassin's Creed Origins and I'm running Windows 10 (I know it's not officially supported). I just wanted to know, if there is any possibility to take the screenshot that does not end as white/black screen only.

PC SPECs Gigabyte X570 UD + Ryzen 3600X + Sapphire RX5700XT reference AMD Radeon driver 20.1.4

K0bin commented 4 years ago

That's a problem with the Radeon tool, not DXVK. Taking screenshots with for example Steam or Nvidia Geforce Experience works fine.

spajdrEX commented 4 years ago

Ok, unfortunately, I don't have STEAM version or NVIDIA card :-) Btw. thanks for info K0bin. Wanted to mention also that when trying to have MSI Afterburner running, it only runs once, but after ACOrigins.dxvk-cache file is created, the next time the game ends with black screen and PC hangs. Tried also only to run new beta 1 of RivaTuner Statistics Server 7.3.0, it makes no difference sadly.

Have a nice day guys

misyltoad commented 4 years ago

RivaTuner statistics server is broken. AMDs screenshot tool is also broken.

I'd super recommend staying away from RTSS and the Radeon Overlay given they cause nothing but problems.

spajdrEX commented 4 years ago

But how I'm supposed to take a screenshot from the game if even ingame option to take a screenshot via F12 key give the same black/white screen :-)? Forgot to mention that when game loads, just before it switches to fullscreen, it shows black/white screen briefly, that's is exactly what is shown when taking the screenshot.

misyltoad commented 4 years ago

Looks like something doesn't like exclusive fullscreen then.

spajdrEX commented 4 years ago

Joshua : Thanks for the information. That brings me an idea to try to disable fullscreen optimization in-game properties. It does something different, on the left side of the screen there was a vertical flashing rainbow line present all the time.

doitsujin commented 4 years ago

Yes, this is a known issue on Windows, and I believe the reason has something to do with how Vulkan surfaces are composited. This only really works with native D3D applications, I think even native Vulkan games are screwed.

spajdrEX commented 4 years ago

Ok, thanks for the info doitsujin, much appreciated.

misyltoad commented 4 years ago

@doitsujin Yes, D3D11 benefits from "fullscreen optimizations" in which it does stuff without getting exclusive fullscreen -- whereas on Vk drivers on windows, if a window covers the whole screen then it gets shoved into exclusive fullscreen automagically.

https://devblogs.microsoft.com/directx/demystifying-full-screen-optimizations/

SveSop commented 4 years ago

@spajdrEX The article describes how to disable Fullscreen Optimizations.

Below are the instructions on how to disable Fullscreen Optimizations for a game.

Right Click on the Executable File (.exe) and Select Properties 
Select the Compatibility Tab 
Under Settings – Select “Disable Fullscreen Optimizations” 
Click Apply  

Does doing that make any changes?

If vulkan does not support this "fullscreen optimization", running a d3d11 game would make windows (WDM) THINK it is running d3d11, but since dxvk renders via vulkan it could be a problem with this? Interesting :)

spajdrEX commented 4 years ago

@SveSop I already tried that and wrote that it only make things worse, it added vertical flashing rainbow line on left side of the screen.

misyltoad commented 4 years ago

If it's a d3d9 app you should be able to use d3d9.enableDialogMode = True in dxvk.conf and it should fix the screenshotting issue.

Maybe it would be worthwhile to add a similar option to the d3d11 frontend @doitsujin?

spajdrEX commented 4 years ago

Thank you for suggestion Joshua. Since dxvk.conf is not created automatically, is it enough to create it manually and add a required line for taking the screenshot?

ZachBacon commented 4 years ago

@spajdrEX to your inquiry, yes.

spajdrEX commented 4 years ago

Not sure exactly, how I fixed screenshot issue with (at least) AC Origins, which is DX11 game, but now it works :-) (I just added under System Properties > Environmental Variables > DXVK_HUD = Full) image

doitsujin commented 4 years ago

Did you enable borderless fullscreen by any chance? I think that should work most of the time.

spajdrEX commented 4 years ago

You are right, I have it set to borderless fullscreen, I was testing something and forgot to switch it back to just Fullscreen :-)

breadland commented 1 week ago

If it's a d3d9 app you should be able to use d3d9.enableDialogMode = True in dxvk.conf and it should fix the screenshotting issue.

Maybe it would be worthwhile to add a similar option to the d3d11 frontend @doitsujin?

YESSS. Adding that to my dxvk.conf for wow 3.3.5a fixed the issue! I didn't have any issues back when I was playing on an Vega 56 on Windows, but since I upgraded to an RTX 3080 all the screenshots I'd take would be stuck on the first frame after a loading screen or whatever I'd see after alt tabbing out and back in. Took me a while to realise it was related to DXVK and not the screenshoting tools.