On a 4k display, but using a 1080 desktop resolution, Witcher 3 set to 1080p performs just fine. It's the same as on a 1080p display with a desktop of the same resolution:

But when using a 4k desktop resolution the game stutters although it is using a 1080p resolution as before.

So if the desktop resolution is greater than the game resolution, the performance suffers. While the fps is not affected, the stuttering is pretty bad. As seen in the screenshots, the frame times and the allocated memory change for the worse.
Witcher 3
Can't reproduce. What window manager / compositor are you using?
xfce4 with compositing disabled
Weird then. Which fullscreen mode did you use? Fullscreen or borderless?
In any case, DXVK doesn't even know what a desktop is, this is not a bug on my end.
Fullscreen, because borderless only uses a quarter of the screen estate in this case.
Btw, this is mesa master with the VK_EXT_transform_feedback patchset and [0] on top (fix for baa38c144f6, reverting baa38c144f6 works too).
[0] https://lists.freedesktop.org/archives/mesa-dev/2018-October/207311.html
I'm running a mesa-git build with transform feedback as well and everything is working fine here. Borderless Window mode should definitely cover the entire screen as well.
Hm, it doesn't for me, just tried again. The issue is probably related?
Since you mentioned it, enabling the xfce4 compositor doesn't fix the issue.
Nevermind the borderless thing, just tested and the game does indeed resize the window to the selected resolution if it's lower (I'll look into it). Anyway, I don't see any weird frame time behaviour in either mode when running the game at 720p (only have a 1080p display to test with unfortunately).
I just tried wine-devel 3.18 (debian binaries provided by winehq), mesa 18.1.9 from debian/testing packages and your binary 0.90 release - same effects. Looks like it's not because my binaries, at least I didn't mess up those up ;)
asked around in #dri-devel
+MrCooper> dhewg: ah, it leaves the root window size at 4K but switches to a smaller video mode? In that case, page flipping cannot be used for the game window
dhewg> ok, but the game is switching to its configured 1080p resolution, why is the root window resolution relevant?
dhewg> and if i runxrandr --output DisplayPort-0 --mode 1920x1080before launching the game the performance is fine, shouldn't that be the same as the game switching to its res?
+MrCooper> the latter resizes the root window as well
+MrCooper> page flipping can only be used if the game window fully covers the root window
And I wondered why Rise of the Tomb Raider doesn't switch the resolution. Instead it scales the game window to the root window. I guess because of this flipping issue.
Hum, okay. It's still weird that you see these frame time issues whereas it works fine on my end, while we're running very similar hardware configurations, but if that's caused by WSI quirks, that would explain it.
FWIW, Proton has a similar feature that just scales up the rendered image to a full-screen window without changing the resolution, so if you have the Steam version of the game, it might be worth trying that. Unfortunately it is not possible to do this on the DXVK level because it isn't responsible for managing the application window, and messing around with it breaks applications.
Oh, thanks for the proton hint!
git remote add valve https://github.com/ValveSoftware/wine.git
git fetch valve
git checkout valve/proton_3.16 dlls/winex11.drv/
make install
And the issue is gone, wine now does not switch the resolution anymore, it scales like discribed above.
Just skimmed through the diff, oboi @aeikum
+BOOL fs_hack_window_is_hacked(HWND hwnd, struct x11drv_win_data *data)
@dhewg Sorry, I don't understand what you're asking here.
Oh, don't mind me, that's just me admiring your choice of function names :P
Proton contains way too many patches and hacks I don't care about.
So I extracted just the relevant patches for what valve calls "fullscreen hack": fs_hack.patch.gz
That solves this issue.
@aeikum are there any plans to get that upstream in one form or another? I would think quite some 4k display owners would care about this, yet I couldn't even find a bug on winehq (but maybe that's just my bugzilla-foo, or lack thereof)
just for reference; Im one of the few with a 4k monitor and haven't noticed similar issues. HOWEVER, I have a nvidia/gtx 1080 and it is only a handful of games I have gone down in resolution. So could be either of those reasons it hasn't happened to me.
I'm not sure what the fallback to non-page flip entails, but if its copying buffers around that's going to be bandwidth limited.
doitsujin didn't notice the issue too with a 720p game and a 1080p root window. Maybe because he doesn't hit such a limit at those resolutions. Maybe you don't even at 4k. I don't know, but I know I am.
But even if you don't hit it, it sure sounds like an ineffective code path, and looking at the complexity of Valve's patches it sure looks like it's worth avoiding.
@aeikum are there any plans to get that upstream in one form or another? I would think quite some 4k display owners would care about this, yet I couldn't even find a bug on winehq (but maybe that's just my bugzilla-foo, or lack thereof)
I don't think upstream Wine would be interested in it, however wine-staging might want to have it.
@aeikum are there any plans to get that upstream in one form or another? I would think quite some 4k display owners would care about this, yet I couldn't even find a bug on winehq (but maybe that's just my bugzilla-foo, or lack thereof)
I don't think upstream Wine would be interested in it, however wine-staging might want to have it.
Please try to get it to either one, it's such a nice feature, especially on TVs like mine that pretty much only handle one resolution nicely...
I have a similar issue with Witcher 3 on Intel ANV using a UHD620 (kabylake mobile).
The game is much more prone to stutter when the following is true:
When only either is set, I don't get the stuttering.
Which leads me to think it may be a GPU memory pressure issue?
Most helpful comment
Proton contains way too many patches and hacks I don't care about.
So I extracted just the relevant patches for what valve calls "fullscreen hack": fs_hack.patch.gz
That solves this issue.
@aeikum are there any plans to get that upstream in one form or another? I would think quite some 4k display owners would care about this, yet I couldn't even find a bug on winehq (but maybe that's just my bugzilla-foo, or lack thereof)