Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #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.