mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
metal: work on depth/stencil textures, MSAA
This commit is contained in:
@@ -910,8 +910,16 @@ id<MTLRenderPipelineState> Shader::getCachedRenderPipeline(const RenderPipelineK
|
||||
desc.colorAttachments[i] = attachment;
|
||||
}
|
||||
|
||||
// TODO: depth/stencil attachment formats
|
||||
|
||||
auto dsformat = (PixelFormat) key.depthStencilFormat;
|
||||
if (isPixelFormatDepthStencil(dsformat))
|
||||
{
|
||||
bool isSRGB = false;
|
||||
auto formatdesc = Metal::convertPixelFormat(dsformat, isSRGB);
|
||||
if (isPixelFormatDepth(dsformat))
|
||||
desc.depthAttachmentPixelFormat = formatdesc.format;
|
||||
if (isPixelFormatStencil(dsformat))
|
||||
desc.stencilAttachmentPixelFormat = formatdesc.format;
|
||||
}
|
||||
|
||||
{
|
||||
MTLVertexDescriptor *vertdesc = [MTLVertexDescriptor vertexDescriptor];
|
||||
|
||||
Reference in New Issue
Block a user