diff options
author | djsollen <djsollen@google.com> | 2015-06-12 12:01:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-12 12:01:15 -0700 |
commit | 1fe1858a90532f4db578bffb97936742d39ede49 (patch) | |
tree | 12119fd6b50fd7e70a7fc07175fe2c02ad986c65 /src | |
parent | d85093c28fe360650c46971b00a39c6dbf991a6b (diff) |
Revert of Import functionality for new GL backend (patchset #2 id:20001 of https://codereview.chromium.org/1185573003/)
Reason for revert:
breaking multiple builds. For example...
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/667
Original issue's description:
> Import functionality for new GL backend
>
> Brings in the following functionality:
>
> ARB_draw_instanced
> ARB_instanced_arrays
> NV_bindless_texture
> EXT_direct_state_access
> KHR_debug
>
> Also cleans up some of the NVPR extension loading.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/202c4c75fb806f751cf796850bf67fe9793e0643
TBR=bsalomon@google.com,cdalton@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1184863002
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/gl/GrGLAssembleInterface.cpp | 195 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 36 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.h | 15 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCreateNullInterface.cpp | 3 | ||||
-rw-r--r-- | src/gpu/gl/GrGLDefines.h | 39 | ||||
-rw-r--r-- | src/gpu/gl/GrGLInterface.cpp | 187 | ||||
-rw-r--r-- | src/gpu/gl/GrGLNoOpInterface.cpp | 16 | ||||
-rw-r--r-- | src/gpu/gl/GrGLNoOpInterface.h | 13 | ||||
-rw-r--r-- | src/gpu/gl/SkNullGLContext.cpp | 3 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp | 3 |
10 files changed, 16 insertions, 494 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp index 1acc641b39..af5b336b9f 100644 --- a/src/gpu/gl/GrGLAssembleInterface.cpp +++ b/src/gpu/gl/GrGLAssembleInterface.cpp @@ -153,6 +153,10 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { GET_PROC(LineWidth); GET_PROC(LinkProgram); GET_PROC(MapBuffer); + if (extensions.has("GL_EXT_direct_state_access")) { + GET_PROC_SUFFIX(MatrixLoadf, EXT); + GET_PROC_SUFFIX(MatrixLoadIdentity, EXT); + } GET_PROC(PixelStorei); if (extensions.has("GL_EXT_raster_multisample")) { GET_PROC_SUFFIX(RasterSamples, EXT); @@ -269,8 +273,6 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { } if (extensions.has("GL_NV_path_rendering")) { - GET_PROC_SUFFIX(MatrixLoadf, EXT); - GET_PROC_SUFFIX(MatrixLoadIdentity, EXT); GET_PROC_SUFFIX(PathCommands, NV); GET_PROC_SUFFIX(PathCoords, NV); GET_PROC_SUFFIX(PathParameteri, NV); @@ -321,160 +323,6 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { GET_PROC(GetProgramResourceLocation); } - if (glVer >= GR_GL_VER(3,1) || extensions.has("GL_ARB_draw_instanced")) { - GET_PROC(DrawArraysInstanced); - GET_PROC(DrawElementsInstanced); - } - - if (glVer >= GR_GL_VER(3,2) || extensions.has("GL_ARB_instanced_arrays")) { - GET_PROC(VertexAttribDivisor); - if (extensions.has("GL_EXT_direct_state_access")) { - GET_PROC_SUFFIX(VertexArrayVertexAttribDivisor, EXT); - } - } - - if (extensions.has("GL_NV_bindless_texture")) { - GET_PROC_SUFFIX(GetTextureHandle, NV); - GET_PROC_SUFFIX(GetTextureSamplerHandle, NV); - GET_PROC_SUFFIX(MakeTextureHandleResident, NV); - GET_PROC_SUFFIX(MakeTextureHandleNonResident, NV); - GET_PROC_SUFFIX(GetImageHandle, NV); - GET_PROC_SUFFIX(MakeImageHandleResident, NV); - GET_PROC_SUFFIX(MakeImageHandleNonResident, NV); - GET_PROC_SUFFIX(IsTextureHandleResident, NV); - GET_PROC_SUFFIX(IsImageHandleResident, NV); - GET_PROC_SUFFIX(UniformHandleui64, NV); - GET_PROC_SUFFIX(UniformHandleui64v, NV); - GET_PROC_SUFFIX(ProgramUniformHandleui64, NV); - GET_PROC_SUFFIX(ProgramUniformHandleui64v, NV); - } - - if (extensions.has("GL_EXT_direct_state_access")) { - GET_PROC_SUFFIX(TextureParameteri, EXT); - GET_PROC_SUFFIX(TextureParameteriv, EXT); - GET_PROC_SUFFIX(TextureParameterf, EXT); - GET_PROC_SUFFIX(TextureParameterfv, EXT); - GET_PROC_SUFFIX(TextureImage1D, EXT); - GET_PROC_SUFFIX(TextureImage2D, EXT); - GET_PROC_SUFFIX(TextureSubImage1D, EXT); - GET_PROC_SUFFIX(TextureSubImage2D, EXT); - GET_PROC_SUFFIX(CopyTextureImage1D, EXT); - GET_PROC_SUFFIX(CopyTextureImage2D, EXT); - GET_PROC_SUFFIX(CopyTextureSubImage1D, EXT); - GET_PROC_SUFFIX(CopyTextureSubImage2D, EXT); - GET_PROC_SUFFIX(GetTextureImage, EXT); - GET_PROC_SUFFIX(GetTextureParameterfv, EXT); - GET_PROC_SUFFIX(GetTextureParameteriv, EXT); - GET_PROC_SUFFIX(GetTextureLevelParameterfv, EXT); - GET_PROC_SUFFIX(GetTextureLevelParameteriv, EXT); - if (glVer >= GR_GL_VER(1,2)) { - GET_PROC_SUFFIX(TextureImage3D, EXT); - GET_PROC_SUFFIX(TextureSubImage3D, EXT); - GET_PROC_SUFFIX(CopyTextureSubImage3D, EXT); - GET_PROC_SUFFIX(CompressedTextureImage3D, EXT); - GET_PROC_SUFFIX(CompressedTextureImage2D, EXT); - GET_PROC_SUFFIX(CompressedTextureImage1D, EXT); - GET_PROC_SUFFIX(CompressedTextureSubImage3D, EXT); - GET_PROC_SUFFIX(CompressedTextureSubImage2D, EXT); - GET_PROC_SUFFIX(CompressedTextureSubImage1D, EXT); - GET_PROC_SUFFIX(GetCompressedTextureImage, EXT); - } - if (glVer >= GR_GL_VER(1,5)) { - GET_PROC_SUFFIX(NamedBufferData, EXT); - GET_PROC_SUFFIX(NamedBufferSubData, EXT); - GET_PROC_SUFFIX(MapNamedBuffer, EXT); - GET_PROC_SUFFIX(UnmapNamedBuffer, EXT); - GET_PROC_SUFFIX(GetNamedBufferParameteriv, EXT); - GET_PROC_SUFFIX(GetNamedBufferPointerv, EXT); - GET_PROC_SUFFIX(GetNamedBufferSubData, EXT); - } - if (glVer >= GR_GL_VER(2,0)) { - GET_PROC_SUFFIX(ProgramUniform1f, EXT); - GET_PROC_SUFFIX(ProgramUniform2f, EXT); - GET_PROC_SUFFIX(ProgramUniform3f, EXT); - GET_PROC_SUFFIX(ProgramUniform4f, EXT); - GET_PROC_SUFFIX(ProgramUniform1i, EXT); - GET_PROC_SUFFIX(ProgramUniform2i, EXT); - GET_PROC_SUFFIX(ProgramUniform3i, EXT); - GET_PROC_SUFFIX(ProgramUniform4i, EXT); - GET_PROC_SUFFIX(ProgramUniform1fv, EXT); - GET_PROC_SUFFIX(ProgramUniform2fv, EXT); - GET_PROC_SUFFIX(ProgramUniform3fv, EXT); - GET_PROC_SUFFIX(ProgramUniform4fv, EXT); - GET_PROC_SUFFIX(ProgramUniform1iv, EXT); - GET_PROC_SUFFIX(ProgramUniform2iv, EXT); - GET_PROC_SUFFIX(ProgramUniform3iv, EXT); - GET_PROC_SUFFIX(ProgramUniform4iv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix2fv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix3fv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix4fv, EXT); - } - if (glVer >= GR_GL_VER(2,1)) { - GET_PROC_SUFFIX(ProgramUniformMatrix2x3fv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix3x2fv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix2x4fv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix4x2fv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix3x4fv, EXT); - GET_PROC_SUFFIX(ProgramUniformMatrix4x3fv, EXT); - } - if (glVer >= GR_GL_VER(3,0)) { - GET_PROC_SUFFIX(NamedRenderbufferStorage, EXT); - GET_PROC_SUFFIX(GetNamedRenderbufferParameteriv, EXT); - GET_PROC_SUFFIX(NamedRenderbufferStorageMultisample, EXT); - GET_PROC_SUFFIX(CheckNamedFramebufferStatus, EXT); - GET_PROC_SUFFIX(NamedFramebufferTexture1D, EXT); - GET_PROC_SUFFIX(NamedFramebufferTexture2D, EXT); - GET_PROC_SUFFIX(NamedFramebufferTexture3D, EXT); - GET_PROC_SUFFIX(NamedFramebufferRenderbuffer, EXT); - GET_PROC_SUFFIX(GetNamedFramebufferAttachmentParameteriv, EXT); - GET_PROC_SUFFIX(GenerateTextureMipmap, EXT); - GET_PROC_SUFFIX(FramebufferDrawBuffer, EXT); - GET_PROC_SUFFIX(FramebufferDrawBuffers, EXT); - GET_PROC_SUFFIX(FramebufferReadBuffer, EXT); - GET_PROC_SUFFIX(GetFramebufferParameteriv, EXT); - GET_PROC_SUFFIX(NamedCopyBufferSubData, EXT); - GET_PROC_SUFFIX(VertexArrayVertexOffset, EXT); - GET_PROC_SUFFIX(VertexArrayColorOffset, EXT); - GET_PROC_SUFFIX(VertexArrayEdgeFlagOffset, EXT); - GET_PROC_SUFFIX(VertexArrayIndexOffset, EXT); - GET_PROC_SUFFIX(VertexArrayNormalOffset, EXT); - GET_PROC_SUFFIX(VertexArrayTexCoordOffset, EXT); - GET_PROC_SUFFIX(VertexArrayMultiTexCoordOffset, EXT); - GET_PROC_SUFFIX(VertexArrayFogCoordOffset, EXT); - GET_PROC_SUFFIX(VertexArraySecondaryColorOffset, EXT); - GET_PROC_SUFFIX(VertexArrayVertexAttribOffset, EXT); - GET_PROC_SUFFIX(VertexArrayVertexAttribIOffset, EXT); - GET_PROC_SUFFIX(EnableVertexArray, EXT); - GET_PROC_SUFFIX(DisableVertexArray, EXT); - GET_PROC_SUFFIX(EnableVertexArrayAttrib, EXT); - GET_PROC_SUFFIX(DisableVertexArrayAttrib, EXT); - GET_PROC_SUFFIX(GetVertexArrayIntegerv, EXT); - GET_PROC_SUFFIX(GetVertexArrayPointerv, EXT); - GET_PROC_SUFFIX(GetVertexArrayIntegeri_v, EXT); - GET_PROC_SUFFIX(GetVertexArrayPointeri_v, EXT); - GET_PROC_SUFFIX(MapNamedBufferRange, EXT); - GET_PROC_SUFFIX(FlushMappedNamedBufferRange, EXT); - } - } - - if (glVer >= GR_GL_VER(4,3)) { - GET_PROC(DebugMessageControl); - GET_PROC(DebugMessageInsert); - GET_PROC(DebugMessageCallback); - GET_PROC(GetDebugMessageLog); - GET_PROC(PushDebugGroup); - GET_PROC(PopDebugGroup); - GET_PROC(ObjectLabel); - } else if (extensions.has("GL_KHR_debug")) { - GET_PROC_SUFFIX(DebugMessageControl, KHR); - GET_PROC_SUFFIX(DebugMessageInsert, KHR); - GET_PROC_SUFFIX(DebugMessageCallback, KHR); - GET_PROC_SUFFIX(GetDebugMessageLog, KHR); - GET_PROC_SUFFIX(PushDebugGroup, KHR); - GET_PROC_SUFFIX(PopDebugGroup, KHR); - GET_PROC_SUFFIX(ObjectLabel, KHR); - } - interface->fStandard = kGL_GrGLStandard; interface->fExtensions.swap(&extensions); @@ -718,41 +566,6 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) { GET_PROC_SUFFIX(CoverageModulation, NV); } - if (version >= GR_GL_VER(3,0) || extensions.has("GL_EXT_draw_instanced")) { - GET_PROC(DrawArraysInstanced); - GET_PROC(DrawElementsInstanced); - } - - if (version >= GR_GL_VER(3,0) || extensions.has("GL_EXT_instanced_arrays")) { - GET_PROC(VertexAttribDivisor); - } - - if (extensions.has("GL_NV_bindless_texture")) { - GET_PROC_SUFFIX(GetTextureHandle, NV); - GET_PROC_SUFFIX(GetTextureSamplerHandle, NV); - GET_PROC_SUFFIX(MakeTextureHandleResident, NV); - GET_PROC_SUFFIX(MakeTextureHandleNonResident, NV); - GET_PROC_SUFFIX(GetImageHandle, NV); - GET_PROC_SUFFIX(MakeImageHandleResident, NV); - GET_PROC_SUFFIX(MakeImageHandleNonResident, NV); - GET_PROC_SUFFIX(IsTextureHandleResident, NV); - GET_PROC_SUFFIX(IsImageHandleResident, NV); - GET_PROC_SUFFIX(UniformHandleui64, NV); - GET_PROC_SUFFIX(UniformHandleui64v, NV); - GET_PROC_SUFFIX(ProgramUniformHandleui64, NV); - GET_PROC_SUFFIX(ProgramUniformHandleui64v, NV); - } - - if (extensions.has("GL_KHR_debug")) { - GET_PROC_SUFFIX(DebugMessageControl, KHR); - GET_PROC_SUFFIX(DebugMessageInsert, KHR); - GET_PROC_SUFFIX(DebugMessageCallback, KHR); - GET_PROC_SUFFIX(GetDebugMessageLog, KHR); - GET_PROC_SUFFIX(PushDebugGroup, KHR); - GET_PROC_SUFFIX(PopDebugGroup, KHR); - GET_PROC_SUFFIX(ObjectLabel, KHR); - } - interface->fStandard = kGLES_GrGLStandard; interface->fExtensions.swap(&extensions); diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index eacf6f6084..91cf83147c 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -39,9 +39,6 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, fTwoFormatLimit = false; fFragCoordsConventionSupport = false; fVertexArrayObjectSupport = false; - fInstancedDrawingSupport = false; - fDirectStateAccessSupport = false; - fDebugSupport = false; fES2CompatibilitySupport = false; fMultisampleDisableSupport = false; fUseNonVBOVertexAndIndexDynamicData = false; @@ -92,8 +89,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, } } - glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_texture"); - // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); @@ -235,28 +230,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, ctxInfo.hasExtension("GL_OES_vertex_array_object"); } - if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3,2)) || - (kGLES_GrGLStandard == standard && version >= GR_GL_VER(3,0))) { - fInstancedDrawingSupport = true; - } else { - fInstancedDrawingSupport = (ctxInfo.hasExtension("GL_ARB_draw_instanced") || - ctxInfo.hasExtension("GL_EXT_draw_instanced")) && - (ctxInfo.hasExtension("GL_ARB_instanced_arrays") || - ctxInfo.hasExtension("GL_EXT_instanced_arrays")); - } - - if (kGL_GrGLStandard == standard) { - fDirectStateAccessSupport = ctxInfo.hasExtension("GL_EXT_direct_state_access"); - } else { - fDirectStateAccessSupport = false; - } - - if (kGL_GrGLStandard == standard && version >= GR_GL_VER(4,3)) { - fDebugSupport = true; - } else { - fDebugSupport = ctxInfo.hasExtension("GL_KHR_debug"); - } - if (kGL_GrGLStandard == standard) { fES2CompatibilitySupport = ctxInfo.hasExtension("GL_ARB_ES2_compatibility"); } @@ -281,7 +254,9 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, // We only support v1.3+ of GL_NV_path_rendering which allows us to // set individual fragment inputs with ProgramPathFragmentInputGen. The API // additions are detected by checking the existence of the function. - glslCaps->fPathRenderingSupport = ((ctxInfo.version() >= GR_GL_VER(4, 3) || + glslCaps->fPathRenderingSupport = + ctxInfo.hasExtension("GL_EXT_direct_state_access") && + ((ctxInfo.version() >= GR_GL_VER(4, 3) || ctxInfo.hasExtension("GL_ARB_program_interface_query")) && gli->fFunctions.fProgramPathFragmentInputGen); } @@ -1048,9 +1023,6 @@ SkString GrGLCaps::dump() const { r.appendf("Fragment coord conventions support: %s\n", (fFragCoordsConventionSupport ? "YES": "NO")); r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); - r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YES": "NO")); - r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO")); - r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ? "YES" : "NO")); r.appendf("Use non-VBO for dynamic data: %s\n", (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); @@ -1067,7 +1039,6 @@ GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options, fDropsTileOnZeroDivide = false; fFBFetchSupport = false; fFBFetchNeedsCustomOutput = false; - fBindlessTextureSupport = false; fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; fFBFetchColorName = NULL; fFBFetchExtensionString = NULL; @@ -1092,7 +1063,6 @@ SkString GrGLSLCaps::dump() const { r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); - r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO")); r.appendf("Advanced blend equation interaction: %s\n", kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); return r; diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h index 1f5d6c2650..ac89115a7b 100644 --- a/src/gpu/gl/GrGLCaps.h +++ b/src/gpu/gl/GrGLCaps.h @@ -224,15 +224,6 @@ public: /// Is there support for Vertex Array Objects? bool vertexArrayObjectSupport() const { return fVertexArrayObjectSupport; } - /// Is there support for glDraw*Instanced and glVertexAttribDivisor? - bool instancedDrawingSupport() const { return fInstancedDrawingSupport; } - - /// Is there support for GL_EXT_direct_state_access? - bool directStateAccessSupport() const { return fDirectStateAccessSupport; } - - /// Is there support for GL_KHR_debug? - bool debugSupport() const { return fDebugSupport; } - /// Is there support for ES2 compatability? bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; } @@ -359,9 +350,6 @@ private: bool fTwoFormatLimit : 1; bool fFragCoordsConventionSupport : 1; bool fVertexArrayObjectSupport : 1; - bool fInstancedDrawingSupport : 1; - bool fDirectStateAccessSupport : 1; - bool fDebugSupport : 1; bool fES2CompatibilitySupport : 1; bool fMultisampleDisableSupport : 1; bool fUseNonVBOVertexAndIndexDynamicData : 1; @@ -417,8 +405,6 @@ public: bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; } - bool bindlessTextureSupport() const { return fBindlessTextureSupport; } - const char* fbFetchColorName() const { return fFBFetchColorName; } const char* fbFetchExtensionString() const { return fFBFetchExtensionString; } @@ -455,7 +441,6 @@ private: bool fDropsTileOnZeroDivide : 1; bool fFBFetchSupport : 1; bool fFBFetchNeedsCustomOutput : 1; - bool fBindlessTextureSupport : 1; const char* fFBFetchColorName; const char* fFBFetchExtensionString; diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp index 41d8f5ddd0..512c672a65 100644 --- a/src/gpu/gl/GrGLCreateNullInterface.cpp +++ b/src/gpu/gl/GrGLCreateNullInterface.cpp @@ -382,11 +382,9 @@ const GrGLInterface* GrGLCreateNullInterface() { functions->fDisable = noOpGLDisable; functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; functions->fDrawArrays = noOpGLDrawArrays; - functions->fDrawArraysInstanced = noOpGLDrawArraysInstanced; functions->fDrawBuffer = noOpGLDrawBuffer; functions->fDrawBuffers = noOpGLDrawBuffers; functions->fDrawElements = noOpGLDrawElements; - functions->fDrawElementsInstanced = noOpGLDrawElementsInstanced; functions->fEnable = noOpGLEnable; functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; functions->fEndQuery = noOpGLEndQuery; @@ -466,7 +464,6 @@ const GrGLInterface* GrGLCreateNullInterface() { functions->fVertexAttrib3fv = noOpGLVertexAttrib3fv; functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; functions->fVertexAttribPointer = noOpGLVertexAttribPointer; - functions->fVertexAttribDivisor = noOpGLVertexAttribDivisor; functions->fViewport = nullGLViewport; functions->fBindFramebuffer = nullGLBindFramebuffer; functions->fBindRenderbuffer = nullGLBindRenderbuffer; diff --git a/src/gpu/gl/GrGLDefines.h b/src/gpu/gl/GrGLDefines.h index cc588b93b7..c08c582b71 100644 --- a/src/gpu/gl/GrGLDefines.h +++ b/src/gpu/gl/GrGLDefines.h @@ -889,43 +889,4 @@ #define GR_GL_MULTISAMPLE_RASTERIZATION_ALLOWED 0x932B #define GR_GL_EFFECTIVE_RASTER_SAMPLES 0x932C -/* GL_KHR_debug */ -#define GR_GL_DEBUG_OUTPUT 0x92E0 -#define GR_GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GR_GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GR_GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GR_GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GR_GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GR_GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GR_GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GR_GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GR_GL_MAX_LABEL_LENGTH 0x82E8 -#define GR_GL_DEBUG_SOURCE_API 0x8246 -#define GR_GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GR_GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GR_GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GR_GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GR_GL_DEBUG_SOURCE_OTHER 0x824B -#define GR_GL_DEBUG_TYPE_ERROR 0x824C -#define GR_GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GR_GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GR_GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GR_GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GR_GL_DEBUG_TYPE_OTHER 0x8251 -#define GR_GL_DEBUG_TYPE_MARKER 0x8268 -#define GR_GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GR_GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GR_GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GR_GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GR_GL_DEBUG_SEVERITY_LOW 0x9148 -#define GR_GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GR_GL_STACK_UNDERFLOW 0x0504 -#define GR_GL_STACK_OVERFLOW 0x0503 -#define GR_GL_BUFFER 0x82E0 -#define GR_GL_SHADER 0x82E1 -#define GR_GL_PROGRAM 0x82E2 -#define GR_GL_QUERY 0x82E3 -#define GR_GL_PROGRAM_PIPELINE 0x82E4 -#define GR_GL_SAMPLER 0x82E6 - #endif diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 2e7cde6546..8bbd2f3b1b 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -466,6 +466,14 @@ bool GrGLInterface::validate() const { } } + if ((kGL_GrGLStandard == fStandard && fExtensions.has("GL_EXT_direct_state_access")) || + (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_NV_path_rendering"))) { + if (NULL == fFunctions.fMatrixLoadf || + NULL == fFunctions.fMatrixLoadIdentity) { + RETURN_FALSE_INTERFACE + } + } + if ((kGL_GrGLStandard == fStandard && (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_query"))) || (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) { @@ -484,9 +492,7 @@ bool GrGLInterface::validate() const { } if (fExtensions.has("GL_NV_path_rendering")) { - if (NULL == fFunctions.fMatrixLoadf || - NULL == fFunctions.fMatrixLoadIdentity || - NULL == fFunctions.fPathCommands || + if (NULL == fFunctions.fPathCommands || NULL == fFunctions.fPathCoords || NULL == fFunctions.fPathParameteri || NULL == fFunctions.fPathParameterf || @@ -534,180 +540,5 @@ bool GrGLInterface::validate() const { } } - if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1)) || - (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) || - fExtensions.has("GL_ARB_draw_instanced") || - fExtensions.has("GL_EXT_draw_instanced")) { - if (NULL == fFunctions.fDrawArraysInstanced || - NULL == fFunctions.fDrawElementsInstanced) { - RETURN_FALSE_INTERFACE - } - } - - if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,2)) || - (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) || - fExtensions.has("GL_ARB_instanced_arrays") || - fExtensions.has("GL_EXT_instanced_arrays")) { - if (NULL == fFunctions.fVertexAttribDivisor) { - RETURN_FALSE_INTERFACE - } - if (kGL_GrGLStandard == fStandard && fExtensions.has("GL_EXT_direct_state_access")) { - if (NULL == fFunctions.fVertexArrayVertexAttribDivisor) { - RETURN_FALSE_INTERFACE - } - } - } - - if (fExtensions.has("GL_NV_bindless_texture")) { - if (NULL == fFunctions.fGetTextureHandle || - NULL == fFunctions.fGetTextureSamplerHandle || - NULL == fFunctions.fMakeTextureHandleResident || - NULL == fFunctions.fMakeTextureHandleNonResident || - NULL == fFunctions.fGetImageHandle || - NULL == fFunctions.fMakeImageHandleResident || - NULL == fFunctions.fMakeImageHandleNonResident || - NULL == fFunctions.fIsTextureHandleResident || - NULL == fFunctions.fIsImageHandleResident || - NULL == fFunctions.fUniformHandleui64 || - NULL == fFunctions.fUniformHandleui64v || - NULL == fFunctions.fProgramUniformHandleui64 || - NULL == fFunctions.fProgramUniformHandleui64v) { - RETURN_FALSE_INTERFACE - } - } - - if (kGL_GrGLStandard == fStandard && fExtensions.has("GL_EXT_direct_state_access")) { - if (NULL == fFunctions.fTextureParameteri || - NULL == fFunctions.fTextureParameteriv || - NULL == fFunctions.fTextureParameterf || - NULL == fFunctions.fTextureParameterfv || - NULL == fFunctions.fTextureImage1D || - NULL == fFunctions.fTextureImage2D || - NULL == fFunctions.fTextureSubImage1D || - NULL == fFunctions.fTextureSubImage2D || - NULL == fFunctions.fCopyTextureImage1D || - NULL == fFunctions.fCopyTextureImage2D || - NULL == fFunctions.fCopyTextureSubImage1D || - NULL == fFunctions.fCopyTextureSubImage2D || - NULL == fFunctions.fGetTextureImage || - NULL == fFunctions.fGetTextureParameterfv || - NULL == fFunctions.fGetTextureParameteriv || - NULL == fFunctions.fGetTextureLevelParameterfv || - NULL == fFunctions.fGetTextureLevelParameteriv) { - RETURN_FALSE_INTERFACE - } - if (glVer >= GR_GL_VER(1,2)) { - if (NULL == fFunctions.fTextureImage3D || - NULL == fFunctions.fTextureSubImage3D || - NULL == fFunctions.fCopyTextureSubImage3D || - NULL == fFunctions.fCompressedTextureImage3D || - NULL == fFunctions.fCompressedTextureImage2D || - NULL == fFunctions.fCompressedTextureImage1D || - NULL == fFunctions.fCompressedTextureSubImage3D || - NULL == fFunctions.fCompressedTextureSubImage2D || - NULL == fFunctions.fCompressedTextureSubImage1D || - NULL == fFunctions.fGetCompressedTextureImage) { - RETURN_FALSE_INTERFACE - } - } - if (glVer >= GR_GL_VER(1,5)) { - if (NULL == fFunctions.fNamedBufferData || - NULL == fFunctions.fNamedBufferSubData || - NULL == fFunctions.fMapNamedBuffer || - NULL == fFunctions.fUnmapNamedBuffer || - NULL == fFunctions.fGetNamedBufferParameteriv || - NULL == fFunctions.fGetNamedBufferPointerv || - NULL == fFunctions.fGetNamedBufferSubData) { - RETURN_FALSE_INTERFACE - } - } - if (glVer >= GR_GL_VER(2,0)) { - if (NULL == fFunctions.fProgramUniform1f || - NULL == fFunctions.fProgramUniform2f || - NULL == fFunctions.fProgramUniform3f || - NULL == fFunctions.fProgramUniform4f || - NULL == fFunctions.fProgramUniform1i || - NULL == fFunctions.fProgramUniform2i || - NULL == fFunctions.fProgramUniform3i || - NULL == fFunctions.fProgramUniform4i || - NULL == fFunctions.fProgramUniform1fv || - NULL == fFunctions.fProgramUniform2fv || - NULL == fFunctions.fProgramUniform3fv || - NULL == fFunctions.fProgramUniform4fv || - NULL == fFunctions.fProgramUniform1iv || - NULL == fFunctions.fProgramUniform2iv || - NULL == fFunctions.fProgramUniform3iv || - NULL == fFunctions.fProgramUniform4iv || - NULL == fFunctions.fProgramUniformMatrix2fv || - NULL == fFunctions.fProgramUniformMatrix3fv || - NULL == fFunctions.fProgramUniformMatrix4fv) { - RETURN_FALSE_INTERFACE - } - } - if (glVer >= GR_GL_VER(2,1)) { - if (NULL == fFunctions.fProgramUniformMatrix2x3fv || - NULL == fFunctions.fProgramUniformMatrix3x2fv || - NULL == fFunctions.fProgramUniformMatrix2x4fv || - NULL == fFunctions.fProgramUniformMatrix4x2fv || - NULL == fFunctions.fProgramUniformMatrix3x4fv || - NULL == fFunctions.fProgramUniformMatrix4x3fv) { - RETURN_FALSE_INTERFACE - } - } - if (glVer >= GR_GL_VER(3,0)) { - if (NULL == fFunctions.fNamedRenderbufferStorage || - NULL == fFunctions.fGetNamedRenderbufferParameteriv || - NULL == fFunctions.fNamedRenderbufferStorageMultisample || - NULL == fFunctions.fCheckNamedFramebufferStatus || - NULL == fFunctions.fNamedFramebufferTexture1D || - NULL == fFunctions.fNamedFramebufferTexture2D || - NULL == fFunctions.fNamedFramebufferTexture3D || - NULL == fFunctions.fNamedFramebufferRenderbuffer || - NULL == fFunctions.fGetNamedFramebufferAttachmentParameteriv || - NULL == fFunctions.fGenerateTextureMipmap || - NULL == fFunctions.fFramebufferDrawBuffer || - NULL == fFunctions.fFramebufferDrawBuffers || - NULL == fFunctions.fFramebufferReadBuffer || - NULL == fFunctions.fGetFramebufferParameteriv || - NULL == fFunctions.fNamedCopyBufferSubData || - NULL == fFunctions.fVertexArrayVertexOffset || - NULL == fFunctions.fVertexArrayColorOffset || - NULL == fFunctions.fVertexArrayEdgeFlagOffset || - NULL == fFunctions.fVertexArrayIndexOffset || - NULL == fFunctions.fVertexArrayNormalOffset || - NULL == fFunctions.fVertexArrayTexCoordOffset || - NULL == fFunctions.fVertexArrayMultiTexCoordOffset || - NULL == fFunctions.fVertexArrayFogCoordOffset || - NULL == fFunctions.fVertexArraySecondaryColorOffset || - NULL == fFunctions.fVertexArrayVertexAttribOffset || - NULL == fFunctions.fVertexArrayVertexAttribIOffset || - NULL == fFunctions.fEnableVertexArray || - NULL == fFunctions.fDisableVertexArray || - NULL == fFunctions.fEnableVertexArrayAttrib || - NULL == fFunctions.fDisableVertexArrayAttrib || - NULL == fFunctions.fGetVertexArrayIntegerv || - NULL == fFunctions.fGetVertexArrayPointerv || - NULL == fFunctions.fGetVertexArrayIntegeri_v || - NULL == fFunctions.fGetVertexArrayPointeri_v || - NULL == fFunctions.fMapNamedBufferRange || - NULL == fFunctions.fFlushMappedNamedBufferRange) { - RETURN_FALSE_INTERFACE - } - } - } - - if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) || - fExtensions.has("GL_KHR_debug")) { - if (NULL == fFunctions.fDebugMessageControl || - NULL == fFunctions.fDebugMessageInsert || - NULL == fFunctions.fDebugMessageCallback || - NULL == fFunctions.fGetDebugMessageLog || - NULL == fFunctions.fPushDebugGroup || - NULL == fFunctions.fPopDebugGroup || - NULL == fFunctions.fObjectLabel) { - RETURN_FALSE_INTERFACE - } - } - return true; } diff --git a/src/gpu/gl/GrGLNoOpInterface.cpp b/src/gpu/gl/GrGLNoOpInterface.cpp index 396eaa46ea..f588046455 100644 --- a/src/gpu/gl/GrGLNoOpInterface.cpp +++ b/src/gpu/gl/GrGLNoOpInterface.cpp @@ -140,12 +140,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLsizei count) { } -GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArraysInstanced(GrGLenum mode, - GrGLint first, - GrGLsizei count, - GrGLsizei primcount) { -} - GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode) { } @@ -159,13 +153,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode, const GrGLvoid* indices) { } -GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElementsInstanced(GrGLenum mode, - GrGLsizei count, - GrGLenum type, - const GrGLvoid* indices, - GrGLsizei primcount) { -} - GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap) { } @@ -402,9 +389,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, const GrGLvoid* ptr) { } -GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribDivisor(GrGLuint index, GrGLuint divisor) { -} - GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x, GrGLint y, GrGLsizei width, diff --git a/src/gpu/gl/GrGLNoOpInterface.h b/src/gpu/gl/GrGLNoOpInterface.h index d90a9b17e3..b803b46097 100644 --- a/src/gpu/gl/GrGLNoOpInterface.h +++ b/src/gpu/gl/GrGLNoOpInterface.h @@ -86,11 +86,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDisableVertexAttribArray(GrGLuint index); GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArrays(GrGLenum mode, GrGLint first, GrGLsizei count); -GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawArraysInstanced(GrGLenum mode, - GrGLint first, - GrGLsizei count, - GrGLsizei primcount); - GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffer(GrGLenum mode); GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawBuffers(GrGLsizei n, @@ -101,12 +96,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElements(GrGLenum mode, GrGLenum type, const GrGLvoid* indices); -GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDrawElementsInstanced(GrGLenum mode, - GrGLsizei count, - GrGLenum type, - const GrGLvoid* indices, - GrGLsizei primcount); - GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnable(GrGLenum cap); GrGLvoid GR_GL_FUNCTION_TYPE noOpGLEnableVertexAttribArray(GrGLuint index); @@ -294,8 +283,6 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribPointer(GrGLuint indx, GrGLsizei stride, const GrGLvoid* ptr); -GrGLvoid GR_GL_FUNCTION_TYPE noOpGLVertexAttribDivisor(GrGLuint index, GrGLuint divisor); - GrGLvoid GR_GL_FUNCTION_TYPE noOpGLViewport(GrGLint x, GrGLint y, GrGLsizei width, diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp index 7ced85e89e..cf07cb3ca2 100644 --- a/src/gpu/gl/SkNullGLContext.cpp +++ b/src/gpu/gl/SkNullGLContext.cpp @@ -385,11 +385,9 @@ static GrGLInterface* create_null_interface(State* state) { functions->fDisable = noOpGLDisable; functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; functions->fDrawArrays = noOpGLDrawArrays; - functions->fDrawArraysInstanced = noOpGLDrawArraysInstanced; functions->fDrawBuffer = noOpGLDrawBuffer; functions->fDrawBuffers = noOpGLDrawBuffers; functions->fDrawElements = noOpGLDrawElements; - functions->fDrawElementsInstanced = noOpGLDrawElementsInstanced; functions->fEnable = noOpGLEnable; functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; functions->fEndQuery = noOpGLEndQuery; @@ -469,7 +467,6 @@ static GrGLInterface* create_null_interface(State* state) { functions->fVertexAttrib3fv = noOpGLVertexAttrib3fv; functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; functions->fVertexAttribPointer = noOpGLVertexAttribPointer; - functions->fVertexAttribDivisor = noOpGLVertexAttribDivisor; functions->fViewport = nullGLViewport; functions->fBindFramebuffer = nullGLBindFramebuffer; functions->fBindRenderbuffer = nullGLBindRenderbuffer; diff --git a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp index 5c5e407c32..e60c519be3 100644 --- a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp +++ b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp @@ -875,11 +875,9 @@ const GrGLInterface* GrGLCreateDebugInterface() { functions->fDisable = noOpGLDisable; functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; functions->fDrawArrays = noOpGLDrawArrays; - functions->fDrawArraysInstanced = noOpGLDrawArraysInstanced; functions->fDrawBuffer = noOpGLDrawBuffer; functions->fDrawBuffers = noOpGLDrawBuffers; functions->fDrawElements = noOpGLDrawElements; - functions->fDrawElementsInstanced = noOpGLDrawElementsInstanced; functions->fEnable = noOpGLEnable; functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; functions->fEndQuery = noOpGLEndQuery; @@ -956,7 +954,6 @@ const GrGLInterface* GrGLCreateDebugInterface() { functions->fVertexAttrib3fv = noOpGLVertexAttrib3fv; functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv; functions->fVertexAttribPointer = noOpGLVertexAttribPointer; - functions->fVertexAttribDivisor = noOpGLVertexAttribDivisor; functions->fViewport = noOpGLViewport; functions->fBindFramebuffer = debugGLBindFramebuffer; functions->fBindRenderbuffer = debugGLBindRenderbuffer; |