protonscr

Request: VRS support

vkd3dclosed
HansKristian-Work/vkd3d-proton#360 · opened 2020-11-05 by oscarbg · updated 2021-04-15 · 6 comments · github
Ooscarbg 2020-11-05 github

Hi,
first thing I want to note is no pressure to implement it..
I understand they may be other (lots of?) more urgent needs..
but couldn't keep without opening an issue asking for it, just as there is one open for DXR support already..

from my understanding, altough VRS support has been supported on Vulkan for two years on Nvidia RTX series via VK_NV_shading_rate_image, it was not much interesting to use to expose DX12 VRS feature, as it was a vendor ext, and it lacked on per primitive shading rate selection support, which is what DX12 VRS tier 1 exposes..
also no games used it aside from:
https://devblogs.microsoft.com/directx/gears-tactics-vrs/

but recently some things have changed related to VRS:

  1. VK_KHR_fragment_shading_rate published which is a cross vendor ext and adds per primitive rate selection so seems equivalent feature wise to DX12 VRS functionality.. VKD3D using that ext should be able to expose DX12 VRS tier1 and 2..
  2. currently we have NV dev drivers support for it and even some Mesa Intel Anvil merge request.
    https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7455/commits
    also hopefully upcoming (initial?) drivers for AMD 6xxx GPU will have support for VK_KHR_fragment_shading_rate..
    let's see also if RADV can gain relatively quickly support for 6xxx series having existing Anvil patches..
  3. Dirt 5 is first AAA game coming tomorrow supposedly having support for DX12 VRS (don't know if it's able to use tier 1 or 2 functionality or both) with more coming later (https://devblogs.microsoft.com/directx/directx-12-ultimate-for-holiday-2020/)..
Ddoitsujin maintainer 2020-11-05 github

We're aware of the Vulkan extensions, and we do not need feature requests to implement core D3D12 features. This will be implemented eventually.

Mmisyltoad maintainer 2020-11-05 github

I wouldn't mind looking into this

Mmisyltoad maintainer 2021-02-03 github

D3D12 exposes D3D12_SHADING_RATE_COMBINER_SUM which is min(MaxShadingRate, a + b);.
This has no equivalent in Vulkan.

There exists fragmentShadingRateStrictMultiplyCombiner which actually kind of implies SUM behaviour to some extent in which with values of 1 for both A and B in the same dimension results in the value 2 being produced for that dimension.

This doesn't help for the 1 + 2 and 2 + 1 cases however: but these make no sense anyway. You can't exactly have a shading rate of 3 so I have no clue what the hell D3D12 is doing there. :-/

SSveSop 2021-02-06 github

World of Warcraft also supports VRS when using D3D12 (as of Shadowlands 9.0.x)

Testing the https://github.com/HansKristian-Work/vkd3d-proton/tree/d3d12-tier1-vrs branch, atleast WoW seems to enable this:

2/5 19:33:34.601  Choosing gpu by name: "NVIDIA GeForce RTX 2070"
2/5 19:33:34.601  D3d12 Device Create
2/5 19:33:34.675  DXGI_FORMAT_B8G8R8A8_UNORM UAV support: false
2/5 19:33:34.678  Ray Tracing Support: None
2/5 19:33:34.678  Variable Rate Shading Supported: true
2/5 19:33:35.070  NotifyOnDeviceCreate
2/5 19:33:35.093  D3d12 Device Create Successful

Not done any fps measuring or any testing to verify it actually working, but so far atleast no negative effect. (There is a WoW VRS comparison video posted someplace on youtube, but it was mostly for underwhelming graphics card).

Mmisyltoad maintainer 2021-04-15 github

TIER_2 is implemented now, closing.