diff options
Diffstat (limited to 'examples/quick/scenegraph/metalunderqml/metalsquircle.mm')
-rw-r--r-- | examples/quick/scenegraph/metalunderqml/metalsquircle.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm index 5ca6daa01a..4844df0c70 100644 --- a/examples/quick/scenegraph/metalunderqml/metalsquircle.mm +++ b/examples/quick/scenegraph/metalunderqml/metalsquircle.mm @@ -349,10 +349,13 @@ void SquircleRenderer::init(int framesInFlight) rpDesc.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOne; rpDesc.colorAttachments[0].destinationAlphaBlendFactor = MTLBlendFactorOne; +#ifdef Q_OS_MACOS if (m_device.depth24Stencil8PixelFormatSupported) { rpDesc.depthAttachmentPixelFormat = MTLPixelFormatDepth24Unorm_Stencil8; rpDesc.stencilAttachmentPixelFormat = MTLPixelFormatDepth24Unorm_Stencil8; - } else { + } else +#endif + { rpDesc.depthAttachmentPixelFormat = MTLPixelFormatDepth32Float_Stencil8; rpDesc.stencilAttachmentPixelFormat = MTLPixelFormatDepth32Float_Stencil8; } |