aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar tomhudson <tomhudson@google.com>2015-04-21 14:16:53 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-21 14:16:53 -0700
commit2575f317d3fa977676279097332955c20ad46044 (patch)
tree533e80063699daff6fe0333861a4b880645b1a03 /src/gpu/gl
parenta7c6389ebf19cf58926f7a1616f0e5554c56aa84 (diff)
Revert of Add tokens and entry points for KHR_blend_equation_advanced (patchset #3 id:40001 of https://codereview.chromium.org/1039693004/)
Reason for revert: We're getting repeated crashes since this CL landed when we try to evaluate a roll into Chrome on our bots. (https://uberchromegw.corp.google.com/i/client.skia/builders/Linux%20Tests/builds/1902) Our initial reflex is to put a #if 0 around this code (just like the immediately following lines 334-338 in GrGLInterface.cpp), but the error isn't what the GPU team expected to see if that was all we needed, so we're reverting now and asking you to resubmit tomorrow after running more thorough tests. Original issue's description: > Add tokens and entry points for KHR_blend_equation_advanced > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/8e578859f80b46a63144add215955221017d3609 TBR=markkilgard@gmail.com,bsalomon@google.com,cdalton@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1101593002
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.cpp28
-rw-r--r--src/gpu/gl/GrGLCreateNullInterface.cpp1
-rw-r--r--src/gpu/gl/GrGLDefines.h22
-rw-r--r--src/gpu/gl/GrGLInterface.cpp10
-rw-r--r--src/gpu/gl/GrGLNoOpInterface.cpp10
-rw-r--r--src/gpu/gl/GrGLNoOpInterface.h8
-rw-r--r--src/gpu/gl/SkNullGLContext.cpp1
-rw-r--r--src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp2
-rw-r--r--src/gpu/gl/debug/GrGLCreateDebugInterface.cpp1
9 files changed, 11 insertions, 72 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index 89b21fdec3..b0f0430ffb 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -70,28 +70,14 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
}
GET_PROC(BeginQuery);
GET_PROC(BindTexture);
-
- if (extensions.has("GL_KHR_blend_equation_advanced")) {
- GET_PROC_SUFFIX(BlendBarrier, KHR);
- } else if (extensions.has("GL_NV_blend_equation_advanced")) {
- GET_PROC_SUFFIX(BlendBarrier, NV);
- }
+ GET_PROC(BlendFunc);
if (glVer >= GR_GL_VER(1,4) ||
- extensions.has("GL_ARB_imaging")) {
+ extensions.has("GL_ARB_imaging") ||
+ extensions.has("GL_EXT_blend_color")) {
GET_PROC(BlendColor);
- } else if (extensions.has("GL_EXT_blend_color")) {
- GET_PROC_SUFFIX(BlendColor, EXT);
- }
-
- if (glVer >= GR_GL_VER(1,4) ||
- extensions.has("GL_ARB_imaging")) {
- GET_PROC(BlendEquation);
- } else if (extensions.has("GL_EXT_blend_subtract")) {
- GET_PROC_SUFFIX(BlendEquation, EXT);
}
- GET_PROC(BlendFunc);
GET_PROC(BufferData);
GET_PROC(BufferSubData);
GET_PROC(Clear);
@@ -355,15 +341,7 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
GET_PROC(BindBuffer);
GET_PROC(BindTexture);
GET_PROC_SUFFIX(BindVertexArray, OES);
-
- if (extensions.has("GL_KHR_blend_equation_advanced")) {
- GET_PROC_SUFFIX(BlendBarrier, KHR);
- } else if (extensions.has("GL_NV_blend_equation_advanced")) {
- GET_PROC_SUFFIX(BlendBarrier, NV);
- }
-
GET_PROC(BlendColor);
- GET_PROC(BlendEquation);
GET_PROC(BlendFunc);
GET_PROC(BufferData);
GET_PROC(BufferSubData);
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index 512c672a65..c86a0bd2fd 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -357,7 +357,6 @@ const GrGLInterface* GrGLCreateNullInterface() {
functions->fBindTexture = nullGLBindTexture;
functions->fBindVertexArray = nullGLBindVertexArray;
functions->fBlendColor = noOpGLBlendColor;
- functions->fBlendEquation = noOpGLBlendEquation;
functions->fBlendFunc = noOpGLBlendFunc;
functions->fBufferData = nullGLBufferData;
functions->fBufferSubData = noOpGLBufferSubData;
diff --git a/src/gpu/gl/GrGLDefines.h b/src/gpu/gl/GrGLDefines.h
index 511659c492..ae4050014b 100644
--- a/src/gpu/gl/GrGLDefines.h
+++ b/src/gpu/gl/GrGLDefines.h
@@ -45,28 +45,6 @@
/* GL_GEQUAL */
/* GL_ALWAYS */
-/* Basic OpenGL blend equations */
-#define GR_GL_FUNC_ADD 0x8006
-#define GR_GL_FUNC_SUBTRACT 0x800A
-#define GR_GL_FUNC_REVERSE_SUBTRACT 0x800B
-
-/* GL_KHR_blend_equation_advanced */
-#define GR_GL_SCREEN 0x9295
-#define GR_GL_OVERLAY 0x9296
-#define GR_GL_DARKEN 0x9297
-#define GR_GL_LIGHTEN 0x9298
-#define GR_GL_COLORDODGE 0x9299
-#define GR_GL_COLORBURN 0x929A
-#define GR_GL_HARDLIGHT 0x929B
-#define GR_GL_SOFTLIGHT 0x929C
-#define GR_GL_DIFFERENCE 0x929E
-#define GR_GL_EXCLUSION 0x92A0
-#define GR_GL_MULTIPLY 0x9294
-#define GR_GL_HSL_HUE 0x92AD
-#define GR_GL_HSL_SATURATION 0x92AE
-#define GR_GL_HSL_COLOR 0x92AF
-#define GR_GL_HSL_LUMINOSITY 0x92B0
-
/* BlendingFactorDest */
#define GR_GL_ZERO 0
#define GR_GL_ONE 1
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 89f1f9ba65..da1c3fc0e1 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -114,9 +114,8 @@ bool GrGLInterface::validate() const {
NULL == fFunctions.fBindAttribLocation ||
NULL == fFunctions.fBindBuffer ||
NULL == fFunctions.fBindTexture ||
- NULL == fFunctions.fBlendColor || // -> GL >= 1.4 or extension, ES >= 2.0
- NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES >= 2.0
NULL == fFunctions.fBlendFunc ||
+ NULL == fFunctions.fBlendColor || // -> GL >= 1.4, ES >= 2.0 or extension
NULL == fFunctions.fBufferData ||
NULL == fFunctions.fBufferSubData ||
NULL == fFunctions.fClear ||
@@ -322,13 +321,6 @@ bool GrGLInterface::validate() const {
}
}
- if (fExtensions.has("GL_KHR_blend_equation_advanced") ||
- fExtensions.has("GL_NV_blend_equation_advanced")) {
- if (NULL == fFunctions.fBlendBarrier) {
- RETURN_FALSE_INTERFACE
- }
- }
-
if (fExtensions.has("GL_EXT_discard_framebuffer")) {
// FIXME: Remove this once Chromium is updated to provide this function
#if 0
diff --git a/src/gpu/gl/GrGLNoOpInterface.cpp b/src/gpu/gl/GrGLNoOpInterface.cpp
index f588046455..6b8880ed81 100644
--- a/src/gpu/gl/GrGLNoOpInterface.cpp
+++ b/src/gpu/gl/GrGLNoOpInterface.cpp
@@ -27,6 +27,7 @@ static const char* kExtensions[] = {
"GL_ARB_timer_query",
"GL_ARB_draw_buffers",
"GL_ARB_occlusion_query",
+ "GL_EXT_blend_color",
"GL_EXT_stencil_wrap"
};
@@ -47,18 +48,15 @@ const GrGLubyte* combined_extensions_string() {
}
}
-GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program,
- GrGLuint colorNumber,
- const GrGLchar* name) {
-}
-
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red,
GrGLclampf green,
GrGLclampf blue,
GrGLclampf alpha) {
}
-GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendEquation(GrGLenum mode) {
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program,
+ GrGLuint colorNumber,
+ const GrGLchar* name) {
}
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor,
diff --git a/src/gpu/gl/GrGLNoOpInterface.h b/src/gpu/gl/GrGLNoOpInterface.h
index b803b46097..c7bc9d8cbb 100644
--- a/src/gpu/gl/GrGLNoOpInterface.h
+++ b/src/gpu/gl/GrGLNoOpInterface.h
@@ -13,16 +13,14 @@
// These are constants/functions that are common to the Null and Debug GL interface implementations.
-GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program,
- GrGLuint colorNumber,
- const GrGLchar* name);
-
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red,
GrGLclampf green,
GrGLclampf blue,
GrGLclampf alpha);
-GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendEquation(GrGLenum mode);
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program,
+ GrGLuint colorNumber,
+ const GrGLchar* name);
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor,
GrGLenum dfactor);
diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp
index cf07cb3ca2..69b559629c 100644
--- a/src/gpu/gl/SkNullGLContext.cpp
+++ b/src/gpu/gl/SkNullGLContext.cpp
@@ -360,7 +360,6 @@ static GrGLInterface* create_null_interface(State* state) {
functions->fBindTexture = nullGLBindTexture;
functions->fBindVertexArray = nullGLBindVertexArray;
functions->fBlendColor = noOpGLBlendColor;
- functions->fBlendEquation = noOpGLBlendEquation;
functions->fBlendFunc = noOpGLBlendFunc;
functions->fBufferData = nullGLBufferData;
functions->fBufferSubData = noOpGLBufferSubData;
diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
index 4569cc8f23..99219d0fd5 100644
--- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
@@ -30,8 +30,6 @@ static GrGLFuncPtr android_get_gl_proc(void* ctx, const char name[]) {
return (GrGLFuncPtr) glBindTexture;
} else if (0 == strcmp("glBlendColor", name)) {
return (GrGLFuncPtr) glBlendColor;
- } else if (0 == strcmp("glBlendEquation", name)) {
- return (GrGLFuncPtr) glBlendEquation;
} else if (0 == strcmp("glBlendFunc", name)) {
return (GrGLFuncPtr) glBlendFunc;
} else if (0 == strcmp("glBufferData", name)) {
diff --git a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
index e60c519be3..4c2acc3fc4 100644
--- a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
+++ b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
@@ -850,7 +850,6 @@ const GrGLInterface* GrGLCreateDebugInterface() {
functions->fBindTexture = debugGLBindTexture;
functions->fBindVertexArray = debugGLBindVertexArray;
functions->fBlendColor = noOpGLBlendColor;
- functions->fBlendEquation = noOpGLBlendEquation;
functions->fBlendFunc = noOpGLBlendFunc;
functions->fBufferData = debugGLBufferData;
functions->fBufferSubData = noOpGLBufferSubData;