mirror of
https://github.com/love2d/love.git
synced 2026-08-20 20:49:54 +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;
|
mtlformat = MTLPixelFormatStencil8;
|
||||||
break;
|
break;
|
||||||
case PIXELFORMAT_DEPTH16_UNORM:
|
case PIXELFORMAT_DEPTH16_UNORM:
|
||||||
#ifdef LOVE_IOS
|
if (@available(macOS 10.12, iOS 13.0, *))
|
||||||
mtlformat = MTLPixelFormatDepth32Float;
|
|
||||||
#else
|
|
||||||
mtlformat = MTLPixelFormatDepth16Unorm;
|
mtlformat = MTLPixelFormatDepth16Unorm;
|
||||||
#endif
|
else
|
||||||
|
mtlformat = MTLPixelFormatDepth32Float;
|
||||||
break;
|
break;
|
||||||
case PIXELFORMAT_DEPTH24_UNORM:
|
case PIXELFORMAT_DEPTH24_UNORM:
|
||||||
mtlformat = MTLPixelFormatDepth32Float;
|
mtlformat = MTLPixelFormatDepth32Float;
|
||||||
|
|||||||
Reference in New Issue
Block a user