SpecialKO / SpecialK

Lovingly referred to as the Swiss Army Knife of PC gaming, Special K does a bit of everything.
https://www.special-k.info/
GNU General Public License v3.0
859 stars 51 forks source link

Problems with Vulkan/DXGI on AMD GPU #208

Open SaltyBet opened 4 days ago

SaltyBet commented 4 days ago

According to these:

... I understand Vulkan/DXGI interop should work on AMD?

Tested RPCS3 using Vulkan and colors are broken when trying to enable HDR.

Monitor output

Logs:

logs.zip

Kaldaien commented 4 days ago

This is a known problem, unfortunately. Special K fully works around their driver interop in OpenGL games.

In the Vulkan case, what's happening is SK is changing the D3D12 SwapChain format, and through a mechanism I don't know, they're copying the Vulkan image over to the D3D12 SwapChain without accounting for format mismatch.

It's difficult for me to develop a fix for this problem without getting my hands on an AMD GPU. I expect if they were doing the copy D3D12-side, SK would already be able to detect the format mismatch and correct it.

So it's either Vulkan-side or some proprietary thing in their driver that is exempt from validating image format :) I'm leaning heavily toward it's something in the driver I probably can't see. If it were being done D3D12-side and not accounted for, the format mismatch would be caught by the driver and the game would instantly crash.

Tl;Dr:

I think HDR is out of the question on AMD systems using Vulkan for now. Probably the only saving grace here is SK can enable HDR in D3D11 before DXVK translates it to Vulkan.

For native Vulkan software, I have no estimate if/when this will be fixed.

SaltyBet commented 21 hours ago

Hi, @Kaldaien.

Over at https://github.com/GPUOpen-Drivers/AMD-Gfx-Drivers/issues/24#issuecomment-2384343026, AMD staff asked for the following:

From reading that thread it seems to be an issue in the vulkan application layer validating image format when translated from D3D12 SwapChain. Can you provide your system specs and a minimally compilable code source that reproduces this issue?

I provided them my specs and referenced the latest version of the SK source as of right now, but maybe you'd like to provide more details over there.