mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
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:
committed by
Commit Bot service account
parent
1dee9164bf
commit
c053b905b5
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user