Bug 107391 - feature request: enforceable vsync and anisotropic filtering via environment variables
Summary: feature request: enforceable vsync and anisotropic filtering via environment ...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
: 109764 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-26 22:21 UTC by tempel.julian
Modified: 2019-05-15 16:06 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description tempel.julian 2018-07-26 22:21:03 UTC
With RadeonSI, it's possible to force vsync on/off with vblank_mode and level of anisotropic filtering with R600_TEX_ANISO.
It would be nice to have equivalent features for RADV.

Explanation why it would make sense to have these:
Some games/applications don't offer options for these features and the user may not like the choice the application forces on him.
For example, a casual game runs with hundreds or thousands of frames per second, which wastes lots of energy. Or a game doesn't offer to turn vsync off and the user doesn't want the additional input lag that comes with this. Enforceable vsync on/off would be very helpful in such cases.

Regarding anisotropic filtering:
Some games tend to ignore to apply AF to every texture when it's not enforced via the driver. Sometimes even ground textures look blurry due to this, which is a real shame. There are lots of examples for this when running DX11 games with DXVK on RADV, e.g. Dying Light or Hitman (they run faster with DXVK than the official OGL Linux ports).
Comment 1 Samuel Pitoiset 2018-09-14 13:07:17 UTC
DXVK now allows to force AF, so I guess the only feature you want is vsync?
Comment 2 tempel.julian 2018-09-14 13:30:43 UTC
DXVK now also supports enforcing vsync on/off. :)
However, it would still be nice to also have these options for outside of DXVK since native Linux apps might not offer full control to the user either (admittedly less likely).
Comment 3 Samuel Pitoiset 2018-09-17 20:22:57 UTC
This patch allows you to force anisotropy with RADV.

https://patchwork.freedesktop.org/patch/250317/
Comment 4 Samuel Pitoiset 2018-09-18 11:29:00 UTC
Feel free to play with RADV_TEX_ANISO

https://cgit.freedesktop.org/mesa/mesa/commit/?id=3871dd7a92624675bd45d9d596bbe34c33d7bb4d
Comment 5 tempel.julian 2018-09-18 11:40:22 UTC
That's fantastic, I'll give it a go in various titles the next time I'm able to.
Not even the amdvlk-windows or DX12 driver (I've missed it already in some DX12 games) provide this, which makes radv really out of the ordinary in this regard.

Thanks a lot for your efforts. As just a common user, I found radv to deliver the most satisfying Vulkan experience even without such goodies.
Comment 6 Samuel Pitoiset 2019-04-10 07:16:32 UTC
I have implemented a way [1] to override the Vulkan presentation mode with MESA_VK_WSI_PRESENT_MODE.

Currently, 3 modes are accepted (fifo/mailbox/immediate). X11 supports these 3 modes while Wayland only supports fifo and mailbox.

If you want to vsync, you just need to export MESA_VK_WSI_PRESENT_MODE=fifo.

[1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=a182adfd83ad00e326153b00a725a014e0359bf0
Comment 7 Samuel Pitoiset 2019-04-10 07:18:08 UTC
*** Bug 109764 has been marked as a duplicate of this bug. ***
Comment 8 tempel.julian 2019-04-10 18:07:57 UTC
I've tested it in vkquake, works like a charm. Again: Huge thanks!
Comment 9 tempel.julian 2019-05-15 16:06:28 UTC
It seems forcing vsync off doesn't work in Rage 2.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.