KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.28k stars 638 forks source link

Multisampling and sRGB issue #1182

Open matteomeli opened 1 week ago

matteomeli commented 1 week ago

I have noticed some issues with the resulting displayed colours of the MSAA sample. When I select MSAA from the drop down list (any sample count) the scene appears much darker. If I choose no MSAA instead, the scene appears much brighter, looking correct.

With MSAA: image

Without MSAA: image

This is on my laptop with an AMD Radeon RX 7700S (discrete), but it also happens with the integrated chip AMD Radeon 780M.

I wrote a much simpler program to just load a texture onto a quad, and I can reproduce the same issue. If I load the texture and create its view with VK_R8G8B8A8_SRGB format, then, if multisampling is enabled, it appears much darker. With multisampling enabled, f I load it with VK_R8G8B8A8_UNORM, then it will appear fine. But if I then disable multisampling, it appears very bright.

On my desktop (Intel UHD Graphics 630 and NVIDIA GeForce RTX 2080 SUPER), the issue doesn't reproduce at all, again with either card.

Any idea what's going on? Is it a known driver issue about multisampling and sRGB on AMD cards?

Driver details are: AMD Software Adrenaline Edition Version: 23.40.18.02 AMD Windows Driver Version: 31.0.24018.2001

SaschaWillems commented 1 week ago

If you can reproduce this in a simple app, it's most probably a driver issue and nothing we can fix.

Sample looks and works fine for me on an RTX 4070 and a Google Pixel 4a.

matteomeli commented 3 days ago

Yeah was worried it could be that.

Have you tried, or could you try, the sample on AMD GPU?

jeroenbakker-atmind commented 20 hours ago

I tried on an M2 and a Arc and was not able to reproduce. I can test AMD early November