Clear glColorMask at the start of a RenderPass for LoadOp::Clear attachments

Bug: dawn:133
Change-Id: Id8c6180f7a9ef2f7901aca6690d611fad4f13beb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6560
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Austin Eng
2019-04-12 17:43:05 +00:00
committed by Commit Bot service account
parent 0c227e21d1
commit bff933affc
2 changed files with 61 additions and 0 deletions

View File

@@ -657,6 +657,7 @@ namespace dawn_native { namespace opengl {
// Load op - color
if (attachmentInfo.loadOp == dawn::LoadOp::Clear) {
glColorMaski(i, true, true, true, true);
glClearBufferfv(GL_COLOR, i, &attachmentInfo.clearColor.r);
}
}