From c1079b38885b76fa5af1e47eeb45cb30d77d94aa Mon Sep 17 00:00:00 2001 From: "borenet@google.com" Date: Tue, 11 Sep 2012 19:29:34 +0000 Subject: Add lots of logging to GrGLInterface.cpp. Temporary. git-svn-id: http://skia.googlecode.com/svn/trunk@5497 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/GrGLInterface.cpp | 177 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) (limited to 'src/gpu/gl/GrGLInterface.cpp') diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 297e1fc1d9..8de8ebd125 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -128,6 +128,95 @@ bool GrGLInterface::validate(GrGLBinding binding) const { NULL == fGenFramebuffers || NULL == fGenRenderbuffers || NULL == fRenderbufferStorage) { + SkDebugf("%d: %i\n", __LINE__, fActiveTexture ); + SkDebugf("%d: %i\n", __LINE__, fAttachShader ); + SkDebugf("%d: %i\n", __LINE__, fBindAttribLocation ); + SkDebugf("%d: %i\n", __LINE__, fBindBuffer ); + SkDebugf("%d: %i\n", __LINE__, fBindTexture ); + SkDebugf("%d: %i\n", __LINE__, fBlendFunc ); + SkDebugf("%d: %i\n", __LINE__, fBlendColor ); // -> GL >= 1.4, ES >= 2.0 or extension + SkDebugf("%d: %i\n", __LINE__, fBufferData ); + SkDebugf("%d: %i\n", __LINE__, fBufferSubData ); + SkDebugf("%d: %i\n", __LINE__, fClear ); + SkDebugf("%d: %i\n", __LINE__, fClearColor ); + SkDebugf("%d: %i\n", __LINE__, fClearStencil ); + SkDebugf("%d: %i\n", __LINE__, fColorMask ); + SkDebugf("%d: %i\n", __LINE__, fCompileShader ); + SkDebugf("%d: %i\n", __LINE__, fCreateProgram ); + SkDebugf("%d: %i\n", __LINE__, fCreateShader ); + SkDebugf("%d: %i\n", __LINE__, fCullFace ); + SkDebugf("%d: %i\n", __LINE__, fDeleteBuffers ); + SkDebugf("%d: %i\n", __LINE__, fDeleteProgram ); + SkDebugf("%d: %i\n", __LINE__, fDeleteShader ); + SkDebugf("%d: %i\n", __LINE__, fDeleteTextures ); + SkDebugf("%d: %i\n", __LINE__, fDepthMask ); + SkDebugf("%d: %i\n", __LINE__, fDisable ); + SkDebugf("%d: %i\n", __LINE__, fDisableVertexAttribArray ); + SkDebugf("%d: %i\n", __LINE__, fDrawArrays ); + SkDebugf("%d: %i\n", __LINE__, fDrawElements ); + SkDebugf("%d: %i\n", __LINE__, fEnable ); + SkDebugf("%d: %i\n", __LINE__, fEnableVertexAttribArray ); + SkDebugf("%d: %i\n", __LINE__, fFrontFace ); + SkDebugf("%d: %i\n", __LINE__, fGenBuffers ); + SkDebugf("%d: %i\n", __LINE__, fGenTextures ); + SkDebugf("%d: %i\n", __LINE__, fGetBufferParameteriv ); + SkDebugf("%d: %i\n", __LINE__, fGetError ); + SkDebugf("%d: %i\n", __LINE__, fGetIntegerv ); + SkDebugf("%d: %i\n", __LINE__, fGetProgramInfoLog ); + SkDebugf("%d: %i\n", __LINE__, fGetProgramiv ); + SkDebugf("%d: %i\n", __LINE__, fGetShaderInfoLog ); + SkDebugf("%d: %i\n", __LINE__, fGetShaderiv ); + SkDebugf("%d: %i\n", __LINE__, fGetString ); + SkDebugf("%d: %i\n", __LINE__, fGetUniformLocation ); + SkDebugf("%d: %i\n", __LINE__, fLinkProgram ); + SkDebugf("%d: %i\n", __LINE__, fPixelStorei ); + SkDebugf("%d: %i\n", __LINE__, fReadPixels ); + SkDebugf("%d: %i\n", __LINE__, fScissor ); + SkDebugf("%d: %i\n", __LINE__, fShaderSource ); + SkDebugf("%d: %i\n", __LINE__, fStencilFunc ); + SkDebugf("%d: %i\n", __LINE__, fStencilMask ); + SkDebugf("%d: %i\n", __LINE__, fStencilOp ); + SkDebugf("%d: %i\n", __LINE__, fTexImage2D ); + SkDebugf("%d: %i\n", __LINE__, fTexParameteri ); + SkDebugf("%d: %i\n", __LINE__, fTexParameteriv ); + SkDebugf("%d: %i\n", __LINE__, fTexSubImage2D ); + SkDebugf("%d: %i\n", __LINE__, fUniform1f ); + SkDebugf("%d: %i\n", __LINE__, fUniform1i ); + SkDebugf("%d: %i\n", __LINE__, fUniform1fv ); + SkDebugf("%d: %i\n", __LINE__, fUniform1iv ); + SkDebugf("%d: %i\n", __LINE__, fUniform2f ); + SkDebugf("%d: %i\n", __LINE__, fUniform2i ); + SkDebugf("%d: %i\n", __LINE__, fUniform2fv ); + SkDebugf("%d: %i\n", __LINE__, fUniform2iv ); + SkDebugf("%d: %i\n", __LINE__, fUniform3f ); + SkDebugf("%d: %i\n", __LINE__, fUniform3i ); + SkDebugf("%d: %i\n", __LINE__, fUniform3fv ); + SkDebugf("%d: %i\n", __LINE__, fUniform3iv ); + SkDebugf("%d: %i\n", __LINE__, fUniform4f ); + SkDebugf("%d: %i\n", __LINE__, fUniform4i ); + SkDebugf("%d: %i\n", __LINE__, fUniform4fv ); + SkDebugf("%d: %i\n", __LINE__, fUniform4iv ); + SkDebugf("%d: %i\n", __LINE__, fUniformMatrix2fv ); + SkDebugf("%d: %i\n", __LINE__, fUniformMatrix3fv ); + SkDebugf("%d: %i\n", __LINE__, fUniformMatrix4fv ); + SkDebugf("%d: %i\n", __LINE__, fUseProgram ); + SkDebugf("%d: %i\n", __LINE__, fVertexAttrib4fv ); + SkDebugf("%d: %i\n", __LINE__, fVertexAttribPointer ); + SkDebugf("%d: %i\n", __LINE__, fViewport ); + SkDebugf("%d: %i\n", __LINE__, fBindFramebuffer ); + SkDebugf("%d: %i\n", __LINE__, fBindRenderbuffer ); + SkDebugf("%d: %i\n", __LINE__, fCheckFramebufferStatus ); + SkDebugf("%d: %i\n", __LINE__, fDeleteFramebuffers ); + SkDebugf("%d: %i\n", __LINE__, fDeleteRenderbuffers ); + SkDebugf("%d: %i\n", __LINE__, fFinish ); + SkDebugf("%d: %i\n", __LINE__, fFlush ); + SkDebugf("%d: %i\n", __LINE__, fFramebufferRenderbuffer ); + SkDebugf("%d: %i\n", __LINE__, fFramebufferTexture2D ); + SkDebugf("%d: %i\n", __LINE__, fGetFramebufferAttachmentParameteriv ); + SkDebugf("%d: %i\n", __LINE__, fGetRenderbufferParameteriv ); + SkDebugf("%d: %i\n", __LINE__, fGenFramebuffers ); + SkDebugf("%d: %i\n", __LINE__, fGenRenderbuffers ); + SkDebugf("%d: %i\n", __LINE__, fRenderbufferStorage); return false; } @@ -146,6 +235,9 @@ bool GrGLInterface::validate(GrGLBinding binding) const { if (NULL == fStencilFuncSeparate || NULL == fStencilMaskSeparate || NULL == fStencilOpSeparate) { + SkDebugf("%d: %i\n", __LINE__, fStencilFuncSeparate ); + SkDebugf("%d: %i\n", __LINE__, fStencilMaskSeparate ); + SkDebugf("%d: %i\n", __LINE__, fStencilOpSeparate); return false; } } else if (kDesktop_GrGLBinding == binding) { @@ -154,15 +246,20 @@ bool GrGLInterface::validate(GrGLBinding binding) const { if (NULL == fStencilFuncSeparate || NULL == fStencilMaskSeparate || NULL == fStencilOpSeparate) { + SkDebugf("%d: %i\n", __LINE__, fStencilFuncSeparate ); + SkDebugf("%d: %i\n", __LINE__, fStencilMaskSeparate ); + SkDebugf("%d: %i\n", __LINE__, fStencilOpSeparate); return false; } } if (glVer >= GR_GL_VER(3,0) && NULL == fBindFragDataLocation) { + SkDebugf("%d: %i\n", __LINE__, fBindFragDataLocation ); return false; } if (glVer >= GR_GL_VER(2,0) || GrGLHasExtensionFromString("GL_ARB_draw_buffers", ext)) { if (NULL == fDrawBuffers) { + SkDebugf("%d: %i\n", __LINE__, fDrawBuffers ); return false; } } @@ -176,6 +273,13 @@ bool GrGLInterface::validate(GrGLBinding binding) const { NULL == fGetQueryiv || NULL == fGetQueryObjectiv || NULL == fGetQueryObjectuiv) { + SkDebugf("%d: %i\n", __LINE__, fGenQueries ); + SkDebugf("%d: %i\n", __LINE__, fDeleteQueries ); + SkDebugf("%d: %i\n", __LINE__, fBeginQuery); + SkDebugf("%d: %i\n", __LINE__, fEndQuery ); + SkDebugf("%d: %i\n", __LINE__, fGetQueryiv ); + SkDebugf("%d: %i\n", __LINE__, fGetQueryObjectiv); + SkDebugf("%d: %i\n", __LINE__, fGetQueryObjectuiv); return false; } } @@ -184,12 +288,15 @@ bool GrGLInterface::validate(GrGLBinding binding) const { GrGLHasExtensionFromString("GL_EXT_timer_query", ext)) { if (NULL == fGetQueryObjecti64v || NULL == fGetQueryObjectui64v) { + SkDebugf("%d: %i\n", __LINE__, fGetQueryObjecti64v); + SkDebugf("%d: %i\n", __LINE__, fGetQueryObjectui64v); return false; } } if (glVer >= GR_GL_VER(3,3) || GrGLHasExtensionFromString("GL_ARB_timer_query", ext)) { if (NULL == fQueryCounter) { + SkDebugf("%d: %i\n", __LINE__, fQueryCounter); return false; } } @@ -200,6 +307,9 @@ bool GrGLInterface::validate(GrGLBinding binding) const { (NULL == fMatrixMode || NULL == fLoadIdentity || NULL == fLoadMatrixf)) { + SkDebugf("%d: %i\n", __LINE__, fMatrixMode ); + SkDebugf("%d: %i\n", __LINE__, fLoadIdentity); + SkDebugf("%d: %i\n", __LINE__, fLoadMatrixf); return false; } if (false && GrGLHasExtensionFromString("GL_NV_path_rendering", ext)) { @@ -252,6 +362,55 @@ bool GrGLInterface::validate(GrGLBinding binding) const { NULL == fIsPointInStrokePath || NULL == fGetPathLength || NULL == fPointAlongPath) { + SkDebugf("%d: %i\n", __LINE__, fPathCommands ); + SkDebugf("%d: %i\n", __LINE__, fPathCoords ); + SkDebugf("%d: %i\n", __LINE__, fPathSubCommands ); + SkDebugf("%d: %i\n", __LINE__, fPathSubCoords ); + SkDebugf("%d: %i\n", __LINE__, fPathString ); + SkDebugf("%d: %i\n", __LINE__, fPathGlyphs ); + SkDebugf("%d: %i\n", __LINE__, fPathGlyphRange ); + SkDebugf("%d: %i\n", __LINE__, fWeightPaths ); + SkDebugf("%d: %i\n", __LINE__, fCopyPath ); + SkDebugf("%d: %i\n", __LINE__, fInterpolatePaths ); + SkDebugf("%d: %i\n", __LINE__, fTransformPath ); + SkDebugf("%d: %i\n", __LINE__, fPathParameteriv ); + SkDebugf("%d: %i\n", __LINE__, fPathParameteri ); + SkDebugf("%d: %i\n", __LINE__, fPathParameterfv ); + SkDebugf("%d: %i\n", __LINE__, fPathParameterf ); + SkDebugf("%d: %i\n", __LINE__, fPathDashArray ); + SkDebugf("%d: %i\n", __LINE__, fGenPaths ); + SkDebugf("%d: %i\n", __LINE__, fDeletePaths ); + SkDebugf("%d: %i\n", __LINE__, fIsPath ); + SkDebugf("%d: %i\n", __LINE__, fPathStencilFunc ); + SkDebugf("%d: %i\n", __LINE__, fPathStencilDepthOffset ); + SkDebugf("%d: %i\n", __LINE__, fStencilFillPath ); + SkDebugf("%d: %i\n", __LINE__, fStencilStrokePath ); + SkDebugf("%d: %i\n", __LINE__, fStencilFillPathInstanced ); + SkDebugf("%d: %i\n", __LINE__, fStencilStrokePathInstanced ); + SkDebugf("%d: %i\n", __LINE__, fPathCoverDepthFunc ); + SkDebugf("%d: %i\n", __LINE__, fPathColorGen ); + SkDebugf("%d: %i\n", __LINE__, fPathTexGen ); + SkDebugf("%d: %i\n", __LINE__, fPathFogGen ); + SkDebugf("%d: %i\n", __LINE__, fCoverFillPath ); + SkDebugf("%d: %i\n", __LINE__, fCoverStrokePath ); + SkDebugf("%d: %i\n", __LINE__, fCoverFillPathInstanced ); + SkDebugf("%d: %i\n", __LINE__, fCoverStrokePathInstanced ); + SkDebugf("%d: %i\n", __LINE__, fGetPathParameteriv ); + SkDebugf("%d: %i\n", __LINE__, fGetPathParameterfv ); + SkDebugf("%d: %i\n", __LINE__, fGetPathCommands ); + SkDebugf("%d: %i\n", __LINE__, fGetPathCoords ); + SkDebugf("%d: %i\n", __LINE__, fGetPathDashArray ); + SkDebugf("%d: %i\n", __LINE__, fGetPathMetrics ); + SkDebugf("%d: %i\n", __LINE__, fGetPathMetricRange ); + SkDebugf("%d: %i\n", __LINE__, fGetPathSpacing ); + SkDebugf("%d: %i\n", __LINE__, fGetPathColorGeniv ); + SkDebugf("%d: %i\n", __LINE__, fGetPathColorGenfv ); + SkDebugf("%d: %i\n", __LINE__, fGetPathTexGeniv ); + SkDebugf("%d: %i\n", __LINE__, fGetPathTexGenfv ); + SkDebugf("%d: %i\n", __LINE__, fIsPointInFillPath ); + SkDebugf("%d: %i\n", __LINE__, fIsPointInStrokePath ); + SkDebugf("%d: %i\n", __LINE__, fGetPathLength ); + SkDebugf("%d: %i\n", __LINE__, fPointAlongPath ); return false; } } @@ -262,6 +421,7 @@ bool GrGLInterface::validate(GrGLBinding binding) const { (glVer >= GR_GL_VER(1,3) || GrGLHasExtensionFromString("GL_ARB_texture_compression", ext))) { if (NULL == fCompressedTexImage2D) { + SkDebugf("%d: %i\n", __LINE__, fCompressedTexImage2D); return false; } } @@ -272,6 +432,10 @@ bool GrGLInterface::validate(GrGLBinding binding) const { NULL == fGetTexLevelParameteriv || NULL == fDrawBuffer || NULL == fReadBuffer)) { + SkDebugf("%d: %i\n", __LINE__, fLineWidth); + SkDebugf("%d: %i\n", __LINE__, fGetTexLevelParameteriv); + SkDebugf("%d: %i\n", __LINE__, fDrawBuffer); + SkDebugf("%d: %i\n", __LINE__, fReadBuffer); return false; } @@ -282,11 +446,13 @@ bool GrGLInterface::validate(GrGLBinding binding) const { GrGLHasExtensionFromString("GL_ARB_texture_storage", ext) || GrGLHasExtensionFromString("GL_EXT_texture_storage", ext)) { if (NULL == fTexStorage2D) { + SkDebugf("%d: %i\n", __LINE__, fTexStorage2D); return false; } } } else if (GrGLHasExtensionFromString("GL_EXT_texture_storage", ext)) { if (NULL == fTexStorage2D) { + SkDebugf("%d: %i\n", __LINE__, fTexStorage2D); return false; } } @@ -297,15 +463,19 @@ bool GrGLInterface::validate(GrGLBinding binding) const { if (glVer >= GR_GL_VER(3,0) || GrGLHasExtensionFromString("GL_ARB_framebuffer_object", ext)) { if (NULL == fRenderbufferStorageMultisample || NULL == fBlitFramebuffer) { + SkDebugf("%d: %i\n", __LINE__, fRenderbufferStorageMultisample); + SkDebugf("%d: %i\n", __LINE__, fBlitFramebuffer); return false; } } else { if (GrGLHasExtensionFromString("GL_EXT_framebuffer_blit", ext) && NULL == fBlitFramebuffer) { + SkDebugf("%d: %i\n", __LINE__, fBlitFramebuffer); return false; } if (GrGLHasExtensionFromString("GL_EXT_framebuffer_multisample", ext) && NULL == fRenderbufferStorageMultisample) { + SkDebugf("%d: %i\n", __LINE__, fRenderbufferStorageMultisample); return false; } } @@ -313,12 +483,16 @@ bool GrGLInterface::validate(GrGLBinding binding) const { if (GrGLHasExtensionFromString("GL_CHROMIUM_framebuffer_multisample", ext)) { if (NULL == fRenderbufferStorageMultisample || NULL == fBlitFramebuffer) { + SkDebugf("%d: %i\n", __LINE__, fRenderbufferStorageMultisample); + SkDebugf("%d: %i\n", __LINE__, fBlitFramebuffer); return false; } } if (GrGLHasExtensionFromString("GL_APPLE_framebuffer_multisample", ext)) { if (NULL == fRenderbufferStorageMultisample || NULL == fResolveMultisampleFramebuffer) { + SkDebugf("%d: %i\n", __LINE__, fRenderbufferStorageMultisample); + SkDebugf("%d: %i\n", __LINE__, fResolveMultisampleFramebuffer); return false; } } @@ -331,6 +505,8 @@ bool GrGLInterface::validate(GrGLBinding binding) const { GrGLHasExtensionFromString("GL_OES_mapbuffer", ext)) { if (NULL == fMapBuffer || NULL == fUnmapBuffer) { + SkDebugf("%d: %i\n", __LINE__, fMapBuffer); + SkDebugf("%d: %i\n", __LINE__, fUnmapBuffer); return false; } } @@ -340,6 +516,7 @@ bool GrGLInterface::validate(GrGLBinding binding) const { (glVer >= GR_GL_VER(3,3) || GrGLHasExtensionFromString("GL_ARB_blend_func_extended", ext))) { if (NULL == fBindFragDataLocationIndexed) { + SkDebugf("%d: %i\n", __LINE__, fBindFragDataLocationIndexed); return false; } } -- cgit v1.2.3