Open baldurk opened 5 years ago
It's weird. Metal only supports read-only access to multisampled textures. So you can only use one as a storage image as long as you don't write to it. But the storage image capability in Vulkan implies that you can write to the image. I'm actually surprised that Apple didn't bother implementing this. I asked for this in rdar://47332558, so we'll see what happens.
Honestly, the reason I added this is that DXVK wanted it. I guess I could turn it back off, since it isn't fully supported and it's not strictly required to create a feature level 11 device--at least, not now.
The problem is that any Vulkan application which checks for the presence of the feature and enables/disables codepaths will see that it's available but then fail to compile pipelines which actually use that feature and crash.
Talking to the DXVK author it seems like DXVK might not actually use the feature - D3D11 doesn't allow MSAA UAVs either. Also I don't think D3D12 does, so any D3D12 emulation project shouldn't need it.
I have disabled the feature in #505. (And I really should've put a "Fixes #502" in there.)
The
shaderStorageImageMultisample
feature is reported as supported unconditionally, but from what I can tell this isn't actually supported by Metal. When compiling a shader with code that stores to an MSAA image I get this error:Which indicates that MSAA textures are read-only. The commit that added this last year 6d4e95a7d7e15e45b32e899b2fa90c5a01a1e3b4 is confusing because it even says "Metal supports read-only access from shaders to multisampled textures" - but then enables the feature that allows write access to them.