mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
metal: fix compile error
This commit is contained in:
@@ -1087,8 +1087,7 @@ id<MTLRenderPipelineState> Shader::getCachedRenderPipeline(const RenderPipelineK
|
|||||||
|
|
||||||
MTLRenderPipelineColorAttachmentDescriptor *attachment = desc.colorAttachments[i];
|
MTLRenderPipelineColorAttachmentDescriptor *attachment = desc.colorAttachments[i];
|
||||||
|
|
||||||
bool isSRGB = false;
|
auto formatdesc = Metal::convertPixelFormat(device, format);
|
||||||
auto formatdesc = Metal::convertPixelFormat(device, format, isSRGB);
|
|
||||||
attachment.pixelFormat = formatdesc.format;
|
attachment.pixelFormat = formatdesc.format;
|
||||||
|
|
||||||
if (key.blend.enable)
|
if (key.blend.enable)
|
||||||
@@ -1124,8 +1123,7 @@ id<MTLRenderPipelineState> Shader::getCachedRenderPipeline(const RenderPipelineK
|
|||||||
{
|
{
|
||||||
// We already don't really support metal on older systems, this just
|
// We already don't really support metal on older systems, this just
|
||||||
// silences a compiler warning about it.
|
// silences a compiler warning about it.
|
||||||
bool isSRGB = false;
|
auto formatdesc = Metal::convertPixelFormat(device, dsformat);
|
||||||
auto formatdesc = Metal::convertPixelFormat(device, dsformat, isSRGB);
|
|
||||||
if (isPixelFormatDepth(dsformat))
|
if (isPixelFormatDepth(dsformat))
|
||||||
desc.depthAttachmentPixelFormat = formatdesc.format;
|
desc.depthAttachmentPixelFormat = formatdesc.format;
|
||||||
if (isPixelFormatStencil(dsformat))
|
if (isPixelFormatStencil(dsformat))
|
||||||
|
|||||||
Reference in New Issue
Block a user