Metal: Use RGBA instead of BGRA and clear render targets by default
This makes rendering of the samples have the wrong colors on the Metal backend, but using BGRA made end2end tests fail. The rendering color will be fixed when the WSI is introduced.
This commit is contained in:
parent
8859178703
commit
c6f9006b02
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue