mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
metal: support for depth16 on iOS
This commit is contained in:
@@ -176,11 +176,10 @@ Metal::PixelFormatDesc Metal::convertPixelFormat(id<MTLDevice> device, PixelForm
|
||||
mtlformat = MTLPixelFormatStencil8;
|
||||
break;
|
||||
case PIXELFORMAT_DEPTH16_UNORM:
|
||||
#ifdef LOVE_IOS
|
||||
mtlformat = MTLPixelFormatDepth32Float;
|
||||
#else
|
||||
mtlformat = MTLPixelFormatDepth16Unorm;
|
||||
#endif
|
||||
if (@available(macOS 10.12, iOS 13.0, *))
|
||||
mtlformat = MTLPixelFormatDepth16Unorm;
|
||||
else
|
||||
mtlformat = MTLPixelFormatDepth32Float;
|
||||
break;
|
||||
case PIXELFORMAT_DEPTH24_UNORM:
|
||||
mtlformat = MTLPixelFormatDepth32Float;
|
||||
|
||||
Reference in New Issue
Block a user