HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.8k stars 185 forks source link

`VKD3D_FILTER_DEVICE_NAME` do not work consistently #1791

Open Zeioth opened 9 months ago

Zeioth commented 9 months ago

System information

Issue description

I'm using MANGOHUD with the config opiton gpu_name so I can see the name of the GPU the game is using, and launching my games with VKD3D_FILTER_DEVICE_NAME="AMD Radeon RX 6700 XT" (the same string I've been using successfully with all my DX11 DVXK games for years with DXVK_FILTER_DEVICE_NAME), but the results are mixed with VKD3D.

Launch parameters

Just to clarify, all games launch without errors.

Log files

doitsujin commented 9 months ago

VKD3D_FILTER_DEVICE_NAME only works if the game does not explicitly pass a DXGI adapter to D3D12CreateDevice. If a game does explicitly pass the adapter, then only the DXVK env var will work.

But yeah, we could consider supporting both environment variables in one of the projects to make this less clunky.

Zeioth commented 9 months ago

ApexLegends is nice to test this:

Also, I'm sure it's filtering the wrong GPU because the performance drops X6.

HansKristian-Work commented 8 months ago

Given we use DXVK DXGI now, that env-var should be deprecated I think.

robotman40 commented 8 months ago

Given we use DXVK DXGI now, that env-var should be deprecated I think.

By any chance, could we use a new env-var that is universal to both DXVK and VKD3D-Proton games to prevent confusion that might come from having to use DXVK's env-var for device filtering?

Zeioth commented 8 months ago

I've re-tested with proton-experimental and mesa 23.2.1-2. Something has changed:

screenshot_2023-12-07_17-22-11_293145892

Mart-Bogdan commented 7 months ago

Filter didn't work for me as well, but this one VKD3D_VULKAN_DEVICE=0 %command% worked. Just had to make sure that device 0 is discrete video-card.

Zeioth commented 7 months ago

Filter didn't work for me as well, but this one VKD3D_VULKAN_DEVICE=0 %command% worked. Just had to make sure that device 0 is discrete video-card.

I can confirm that works for Apex Legends on DX12 mode.

screenshot_2024-01-03_17-17-11_228207209-min

I keep the issue opened because the problem remains with DXVK_FILTER_DEVICE_NAME/VKD3D_FILTER_DEVICE_NAME not working as expected with the DX12 games mentioned above.