mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 07:35:41 +00:00
MetalDevice: Add family check for 16-bit formats
This commit is contained in:
parent
06b11590fe
commit
6cca468e65
|
@ -1285,6 +1285,14 @@ bool MetalDevice::CheckDownloadBufferSize(u32 required_size)
|
|||
|
||||
bool MetalDevice::SupportsTextureFormat(GPUTexture::Format format) const
|
||||
{
|
||||
if (format == GPUTexture::Format::RGB565 || format == GPUTexture::Format::RGBA5551)
|
||||
{
|
||||
// These formats require an Apple Silicon GPU.
|
||||
// See https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
|
||||
if (![m_device supportsFamily:MTLGPUFamilyApple2])
|
||||
return false;
|
||||
}
|
||||
|
||||
return (s_pixel_format_mapping[static_cast<u8>(format)] != MTLPixelFormatInvalid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue