diff --git a/src/backend/metal/CommandBufferMTL.mm b/src/backend/metal/CommandBufferMTL.mm index 2a0ab0412f..80ac7d5a20 100644 --- a/src/backend/metal/CommandBufferMTL.mm +++ b/src/backend/metal/CommandBufferMTL.mm @@ -97,7 +97,8 @@ namespace metal { usingBackbuffer = true; } descriptor.colorAttachments[index].texture = texture; - descriptor.colorAttachments[index].loadAction = MTLLoadActionLoad; + descriptor.colorAttachments[index].loadAction = MTLLoadActionClear; + descriptor.colorAttachments[index].clearColor = MTLClearColorMake(0.0, 0.0, 0.0, 0.0); descriptor.colorAttachments[index].storeAction = MTLStoreActionStore; } // TODO(kainino@chromium.org): load depth attachment from subpass diff --git a/src/backend/metal/PipelineMTL.mm b/src/backend/metal/PipelineMTL.mm index 3732c9d928..8b92aee6e6 100644 --- a/src/backend/metal/PipelineMTL.mm +++ b/src/backend/metal/PipelineMTL.mm @@ -68,7 +68,8 @@ namespace metal { } } - descriptor.colorAttachments[0].pixelFormat = MTLPixelFormatBGRA8Unorm; + // TODO(cwallez@chromium.org): get the attachment formats from the subpass + descriptor.colorAttachments[0].pixelFormat = MTLPixelFormatRGBA8Unorm; descriptor.depthAttachmentPixelFormat = MTLPixelFormatDepth32Float; InputState* inputState = ToBackend(GetInputState());