Open GL ES: implement a fallback path for glClearTexSubImage().

Also enable the CopyTests on OpenGL ES, since they now pass on 3.2.
Enable all tests that are no longer failing due to crbug.com/dawn/581
and update bug references for bugs which are still failing.

Bug: dawn:581, dawn:636
Change-Id: I6b74143f11dd4e1824551720024be174f2eaa003
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38140
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White
2021-01-19 18:34:22 +00:00
committed by Commit Bot service account
parent 1dee9164bf
commit c053b905b5
3 changed files with 29 additions and 13 deletions

View File

@@ -329,9 +329,17 @@ namespace dawn_native { namespace opengl {
mipSize.height, 1, glFormat.format, glFormat.type,
clearColorData.data());
} else {
// TODO(crbug.com/dawn/581): Implement a fallback path on OpenGL ES
// because it doesn't support glClearTexSubImage.
ASSERT(false);
GLuint framebuffer = 0;
gl.GenFramebuffers(1, &framebuffer);
gl.BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
gl.FramebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_COLOR, GetHandle(),
static_cast<int>(level),
static_cast<int>(layer));
gl.Disable(GL_SCISSOR_TEST);
gl.ClearBufferiv(GL_COLOR, 0,
reinterpret_cast<const GLint*>(clearColorData.data()));
gl.Enable(GL_SCISSOR_TEST);
gl.DeleteFramebuffers(1, &framebuffer);
}
}
}