mirror of
https://github.com/love2d/love.git
synced 2026-08-12 00:20:52 +02:00
metal: fix a crash when the window has no depth or stencil.
This commit is contained in:
@@ -696,7 +696,10 @@ id<MTLRenderCommandEncoder> Graphics::useRenderEncoder()
|
||||
|
||||
auto &key = lastRenderPipelineKey;
|
||||
key.colorRenderTargetFormats = isGammaCorrect() ? PIXELFORMAT_BGRA8_sRGB : PIXELFORMAT_BGRA8_UNORM;
|
||||
key.depthStencilFormat = backbufferDepthStencil->getPixelFormat();
|
||||
if (backbufferDepthStencil.get())
|
||||
key.depthStencilFormat = backbufferDepthStencil->getPixelFormat();
|
||||
else
|
||||
key.depthStencilFormat = PIXELFORMAT_UNKNOWN;
|
||||
key.msaa = backbufferMSAA ? (uint8) backbufferMSAA->getMSAA() : 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user