Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoltenVK: We need to handle texture swizzling not being available #12615

Closed
hrydgard opened this issue Feb 5, 2020 · 2 comments · Fixed by #12661
Closed

MoltenVK: We need to handle texture swizzling not being available #12615

hrydgard opened this issue Feb 5, 2020 · 2 comments · Fixed by #12661

Comments

@hrydgard
Copy link
Owner

hrydgard commented Feb 5, 2020

I think we'll just reuse the code used in DX11 on Windows 7 to avoid the 16-bit formats.

See #12583

@Degerz
Copy link

Degerz commented Feb 6, 2020

https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf

Unfortunately, Metal does not appear to have a native equivalent to VK_FORMAT_B4G4R4A4_UNORM_PACK16 when I checked the supported packed 16-bit pixel formats. You could try VK_FORMAT_R4G4B4A4_UNORM_PACK16 instead if Vulkan gpuinfo is anything to go by. Also, VK_FORMAT_A1R5G5B5_UNORM_PACK16 has no equivalent as well in Metal.

If we had Vulkan extensions to use Metal formats would it be possible for you to use ABGR4Unorm in place of BGRA4Unorm and A1BGR5Unorm in place of A1RGB5Unorm too ?

@unknownbrackets
Copy link
Collaborator

We use 4444 formats for two main reasons:

  • When generating font or other data that doesn't need 8888. In this case, we auto-detect support and generate appropriately.
  • When uploading texture data directly from the PSP game.

So if the device doesn't natively support the PSP game's format, then we have to convert it. We already do this on Windows 7 with Direct3D 11, and this is just about extending that to Vulkan (when necessary.)

If we're already going to reprocess the PSP texture data into new RAM, I think moving it to 8888 is the simplest option, rather than trying to change it to another 16-bit format the device supports.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants