Closed TheSpydog closed 2 days ago
One remaining issue is with Metal's ABGR4 format. It doesn't support BGRA4 or any other swizzle natively, and D3D/VK don't support A4B4G4R4 natively. I'll need to set up a Metal swizzle for this format specifically.
Marked this one as ready for now since I believe this is just a quick MTLTextureSwizzle, but if it's a major blocker that can be reverted (otherwise I'll apply this to the weekly update).
Fixes https://github.com/thatcosmonaut/SDL/issues/56.
Replaces:
R5G6B5
->B5G6R5
A1R5G5B5
->B5G5R5A1
A2R10G10B10
->R10G10B10A2
and removes
A2B10G10R10
entirely.The reason for the last change is because I was incorrect in my initial write-up, D3D11/12 have no support for
B10G10R10A2
. So we'd have to swizzleR10G10B10A2
on the D3D side, which is not ideal. To keep as much swizzling logic as possible in Vulkan, I think we should exclusively offer RGBA order.However, Vulkan's native surface support for
A2R10G10B10
is ~12%. So instead we'll always useA2B10R10G10
(which has a ~62% surface support rate) and then swizzle it into RGBA order.One remaining issue is with Metal's
ABGR4
format. It doesn't supportBGRA4
or any other swizzle natively, and D3D/VK don't supportA4B4G4R4
natively. I'll need to set up a Metal swizzle for this format specifically.