protonscr

feature request: force degree of anisotropic filtering via DXVK

dxvkclosed enhancement
doitsujin/dxvk#635 · opened 2018-09-10 by aufkrawall · updated 2020-04-09 · 8 comments · github
Aaufkrawall 2018-09-10 github

Hello,
some game developers think it would be a good idea not to filter every texture with the level of anisotropic filtering that the user can set up in the game's settings.
As a result, despite of chosen 16x AF setting in a game, often even ground textures look unnecessarily blurry. Examples for this would be Hitman (2016) or Dying Light. On Windows with enforced AF via driver, textures look better in these games without any negative side effects (apart from a minor performance hit).
Some games show compatibility issues with forced AF (e.g. Frostbite or Dunia), but most work fine.

Unfortunately, Vulkan drivers don't offer to enforce a defined level of AF, which is the reason of this ticket. :)

Ddoitsujin maintainer 2018-09-10 github

Should be doable.

Ddoitsujin maintainer 2018-09-10 github

012a5c2f74a55b566f23e4218e27581c41e8e295 adds a config option for this, documentation will be in the wiki soon.

Aaufkrawall 2018-09-10 github

Will give it a shot together with the recent vsync additions (I originally planned to ask about them too.).
Thanks a lot for your fantastic efforts to make Linux feel less 2nd class citizen for gaming. :)

Aaufkrawall 2018-09-10 github

It works like a charm, thanks again.

Dunno if I should open a report about this:
Should it be possible to enforce triple buffered vsync with dxgi.syncInterval = 1 and dxgi.numBackBuffers = 3 ?
In Hitman, it always falls back to half of the refresh rate when the fps for full refreshrate can't be achieved. I also tried higher values, also in conjunction with dxgi.maxFrameLatency, but vsync was always double buffered.

Ddoitsujin maintainer 2018-09-10 github

Are you on Nvidia? If so, it's a known issue with their driver. DXVK has always used triple-buffering for VSync by default, and still does.

Aaufkrawall 2018-09-10 github

Yeah, Nvidia.

I also noticed vsync issues in other native Vulkan games like Serious Sam: Fusion or idtech 6 games, where Nvidia vsync behaves like "adaptive" (turns off when fps are below refreshrate) while it works normally on radv/amdvlk-windows.

The only exception I'm aware of where Nvidia vsync works as expected is vkquake, it e.g. runs without tearing at 72fps via fps limiter when vsync is enabled and display is at 75Hz.

Aaqxa1 2018-09-15 github

You can workaround the triple buffering issue on Nvidia by setting "NoFlip" "True" in xorg.conf.

It could potentially hurt performance in other respects IIRC, but I don't recall any serious performance degradation.

Aaufkrawall 2018-09-18 github

Thanks for the hint. It makes vsync in DXVK act like "adaptive", means it turns itself off when fps are below refreshrate. (Edit: It likely also tears very close to the top or bottom of the screen when being vsync capped.)
Nvidia offering this option only globally via xorg.conf (have they ever heard of environment variables?) is a bit unfortunate, though.

Nothing extracted yet.