Commit 5ef0fcf0 authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Don't do workarounds in the GL bindings when using ANGLE.

ANGLE handles these workarounds internally and some of them generate
GL errors when running on top of an ES driver.

BUG=angleproject:3672
BUG=angleproject:3671

Change-Id: Ic301f57f882247db1bbe8991647b12b9bb0b4f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1697530Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677048}
parent 6b72d295
...@@ -323,7 +323,8 @@ void RealGLApi::glTexImage2DFn(GLenum target, ...@@ -323,7 +323,8 @@ void RealGLApi::glTexImage2DFn(GLenum target,
// TODO(yizhou): Check if cubemap, 3d texture or texture2d array has the same // TODO(yizhou): Check if cubemap, 3d texture or texture2d array has the same
// bug on intel mac. // bug on intel mac.
if (gl_workarounds_.reset_teximage2d_base_level && target == GL_TEXTURE_2D) { if (!version_->is_angle && gl_workarounds_.reset_teximage2d_base_level &&
target == GL_TEXTURE_2D) {
GLint base_level = 0; GLint base_level = 0;
GLApiBase::glGetTexParameterivFn(target, GL_TEXTURE_BASE_LEVEL, GLApiBase::glGetTexParameterivFn(target, GL_TEXTURE_BASE_LEVEL,
&base_level); &base_level);
...@@ -417,9 +418,9 @@ void RealGLApi::glClearColorFn(GLclampf red, ...@@ -417,9 +418,9 @@ void RealGLApi::glClearColorFn(GLclampf red,
GLclampf green, GLclampf green,
GLclampf blue, GLclampf blue,
GLclampf alpha) { GLclampf alpha) {
if (gl_workarounds_.clear_to_zero_or_one_broken && (1 == red || 0 == red) && if (!version_->is_angle && gl_workarounds_.clear_to_zero_or_one_broken &&
(1 == green || 0 == green) && (1 == blue || 0 == blue) && (1 == red || 0 == red) && (1 == green || 0 == green) &&
(1 == alpha || 0 == alpha)) { (1 == blue || 0 == blue) && (1 == alpha || 0 == alpha)) {
if (1 == alpha) if (1 == alpha)
alpha = 2; alpha = 2;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment