OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 //////////////////////////////////////////////////////////////////////////////// | 25 //////////////////////////////////////////////////////////////////////////////// |
26 GrGLvoid GR_GL_FUNCTION_TYPE debugGLActiveTexture(GrGLenum texture) { | 26 GrGLvoid GR_GL_FUNCTION_TYPE debugGLActiveTexture(GrGLenum texture) { |
27 | 27 |
28 // Ganesh offsets the texture unit indices | 28 // Ganesh offsets the texture unit indices |
29 texture -= GR_GL_TEXTURE0; | 29 texture -= GR_GL_TEXTURE0; |
30 GrAlwaysAssert(texture < GrDebugGL::getInstance()->getMaxTextureUnits()); | 30 GrAlwaysAssert(texture < GrDebugGL::getInstance()->getMaxTextureUnits()); |
31 | 31 |
32 GrDebugGL::getInstance()->setCurTextureUnit(texture); | 32 GrDebugGL::getInstance()->setCurTextureUnit(texture); |
33 } | 33 } |
34 | 34 |
| 35 GrGLvoid GR_GL_FUNCTION_TYPE debugGLClientActiveTexture(GrGLenum texture) { |
| 36 |
| 37 // Ganesh offsets the texture unit indices |
| 38 texture -= GR_GL_TEXTURE0; |
| 39 GrAlwaysAssert(texture < GrDebugGL::getInstance()->getMaxTextureUnits()); |
| 40 } |
| 41 |
35 //////////////////////////////////////////////////////////////////////////////// | 42 //////////////////////////////////////////////////////////////////////////////// |
36 GrGLvoid GR_GL_FUNCTION_TYPE debugGLAttachShader(GrGLuint programID, | 43 GrGLvoid GR_GL_FUNCTION_TYPE debugGLAttachShader(GrGLuint programID, |
37 GrGLuint shaderID) { | 44 GrGLuint shaderID) { |
38 | 45 |
39 GrProgramObj *program = GR_FIND(programID, GrProgramObj, | 46 GrProgramObj *program = GR_FIND(programID, GrProgramObj, |
40 GrDebugGL::kProgram_ObjTypes); | 47 GrDebugGL::kProgram_ObjTypes); |
41 GrAlwaysAssert(program); | 48 GrAlwaysAssert(program); |
42 | 49 |
43 GrShaderObj *shader = GR_FIND(shaderID, | 50 GrShaderObj *shader = GR_FIND(shaderID, |
44 GrShaderObj, | 51 GrShaderObj, |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 interface->fBindFragDataLocation = noOpGLBindFragDataLocation; | 801 interface->fBindFragDataLocation = noOpGLBindFragDataLocation; |
795 interface->fBindTexture = debugGLBindTexture; | 802 interface->fBindTexture = debugGLBindTexture; |
796 interface->fBindVertexArray = debugGLBindVertexArray; | 803 interface->fBindVertexArray = debugGLBindVertexArray; |
797 interface->fBlendColor = noOpGLBlendColor; | 804 interface->fBlendColor = noOpGLBlendColor; |
798 interface->fBlendFunc = noOpGLBlendFunc; | 805 interface->fBlendFunc = noOpGLBlendFunc; |
799 interface->fBufferData = debugGLBufferData; | 806 interface->fBufferData = debugGLBufferData; |
800 interface->fBufferSubData = noOpGLBufferSubData; | 807 interface->fBufferSubData = noOpGLBufferSubData; |
801 interface->fClear = noOpGLClear; | 808 interface->fClear = noOpGLClear; |
802 interface->fClearColor = noOpGLClearColor; | 809 interface->fClearColor = noOpGLClearColor; |
803 interface->fClearStencil = noOpGLClearStencil; | 810 interface->fClearStencil = noOpGLClearStencil; |
| 811 interface->fClientActiveTexture = debugGLClientActiveTexture; |
804 interface->fColorMask = noOpGLColorMask; | 812 interface->fColorMask = noOpGLColorMask; |
805 interface->fCompileShader = noOpGLCompileShader; | 813 interface->fCompileShader = noOpGLCompileShader; |
806 interface->fCompressedTexImage2D = noOpGLCompressedTexImage2D; | 814 interface->fCompressedTexImage2D = noOpGLCompressedTexImage2D; |
807 interface->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D; | 815 interface->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D; |
808 interface->fCreateProgram = debugGLCreateProgram; | 816 interface->fCreateProgram = debugGLCreateProgram; |
809 interface->fCreateShader = debugGLCreateShader; | 817 interface->fCreateShader = debugGLCreateShader; |
810 interface->fCullFace = noOpGLCullFace; | 818 interface->fCullFace = noOpGLCullFace; |
811 interface->fDeleteBuffers = debugGLDeleteBuffers; | 819 interface->fDeleteBuffers = debugGLDeleteBuffers; |
812 interface->fDeleteProgram = debugGLDeleteProgram; | 820 interface->fDeleteProgram = debugGLDeleteProgram; |
813 interface->fDeleteQueries = noOpGLDeleteIds; | 821 interface->fDeleteQueries = noOpGLDeleteIds; |
814 interface->fDeleteShader = debugGLDeleteShader; | 822 interface->fDeleteShader = debugGLDeleteShader; |
815 interface->fDeleteTextures = debugGLDeleteTextures; | 823 interface->fDeleteTextures = debugGLDeleteTextures; |
816 interface->fDeleteVertexArrays = debugGLDeleteVertexArrays; | 824 interface->fDeleteVertexArrays = debugGLDeleteVertexArrays; |
817 interface->fDepthMask = noOpGLDepthMask; | 825 interface->fDepthMask = noOpGLDepthMask; |
818 interface->fDisable = noOpGLDisable; | 826 interface->fDisable = noOpGLDisable; |
| 827 interface->fDisableClientState = noOpGLDisableClientState; |
819 interface->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; | 828 interface->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray; |
820 interface->fDrawArrays = noOpGLDrawArrays; | 829 interface->fDrawArrays = noOpGLDrawArrays; |
821 interface->fDrawBuffer = noOpGLDrawBuffer; | 830 interface->fDrawBuffer = noOpGLDrawBuffer; |
822 interface->fDrawBuffers = noOpGLDrawBuffers; | 831 interface->fDrawBuffers = noOpGLDrawBuffers; |
823 interface->fDrawElements = noOpGLDrawElements; | 832 interface->fDrawElements = noOpGLDrawElements; |
824 interface->fEnable = noOpGLEnable; | 833 interface->fEnable = noOpGLEnable; |
| 834 interface->fEnableClientState = noOpGLEnableClientState; |
825 interface->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; | 835 interface->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray; |
826 interface->fEndQuery = noOpGLEndQuery; | 836 interface->fEndQuery = noOpGLEndQuery; |
827 interface->fFinish = noOpGLFinish; | 837 interface->fFinish = noOpGLFinish; |
828 interface->fFlush = noOpGLFlush; | 838 interface->fFlush = noOpGLFlush; |
829 interface->fFrontFace = noOpGLFrontFace; | 839 interface->fFrontFace = noOpGLFrontFace; |
830 interface->fGenerateMipmap = debugGLGenerateMipmap; | 840 interface->fGenerateMipmap = debugGLGenerateMipmap; |
831 interface->fGenBuffers = debugGLGenBuffers; | 841 interface->fGenBuffers = debugGLGenBuffers; |
832 interface->fGenQueries = noOpGLGenIds; | 842 interface->fGenQueries = noOpGLGenIds; |
833 interface->fGenTextures = debugGLGenTextures; | 843 interface->fGenTextures = debugGLGenTextures; |
834 interface->fGetBufferParameteriv = debugGLGetBufferParameteriv; | 844 interface->fGetBufferParameteriv = debugGLGetBufferParameteriv; |
835 interface->fGetError = noOpGLGetError; | 845 interface->fGetError = noOpGLGetError; |
836 interface->fGetIntegerv = noOpGLGetIntegerv; | 846 interface->fGetIntegerv = noOpGLGetIntegerv; |
837 interface->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v; | 847 interface->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v; |
838 interface->fGetQueryObjectiv = noOpGLGetQueryObjectiv; | 848 interface->fGetQueryObjectiv = noOpGLGetQueryObjectiv; |
839 interface->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v; | 849 interface->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v; |
840 interface->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv; | 850 interface->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv; |
841 interface->fGetQueryiv = noOpGLGetQueryiv; | 851 interface->fGetQueryiv = noOpGLGetQueryiv; |
842 interface->fGetProgramInfoLog = noOpGLGetInfoLog; | 852 interface->fGetProgramInfoLog = noOpGLGetInfoLog; |
843 interface->fGetProgramiv = noOpGLGetShaderOrProgramiv; | 853 interface->fGetProgramiv = noOpGLGetShaderOrProgramiv; |
844 interface->fGetShaderInfoLog = noOpGLGetInfoLog; | 854 interface->fGetShaderInfoLog = noOpGLGetInfoLog; |
845 interface->fGetShaderiv = noOpGLGetShaderOrProgramiv; | 855 interface->fGetShaderiv = noOpGLGetShaderOrProgramiv; |
846 interface->fGetString = noOpGLGetString; | 856 interface->fGetString = noOpGLGetString; |
847 interface->fGetStringi = noOpGLGetStringi; | 857 interface->fGetStringi = noOpGLGetStringi; |
848 interface->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv; | 858 interface->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv; |
849 interface->fGetUniformLocation = noOpGLGetUniformLocation; | 859 interface->fGetUniformLocation = noOpGLGetUniformLocation; |
850 interface->fGenVertexArrays = debugGLGenVertexArrays; | 860 interface->fGenVertexArrays = debugGLGenVertexArrays; |
| 861 interface->fLoadIdentity = noOpGLLoadIdentity; |
| 862 interface->fLoadMatrixf = noOpGLLoadMatrixf; |
851 interface->fLineWidth = noOpGLLineWidth; | 863 interface->fLineWidth = noOpGLLineWidth; |
852 interface->fLinkProgram = noOpGLLinkProgram; | 864 interface->fLinkProgram = noOpGLLinkProgram; |
| 865 interface->fMatrixMode = noOpGLMatrixMode; |
853 interface->fPixelStorei = debugGLPixelStorei; | 866 interface->fPixelStorei = debugGLPixelStorei; |
854 interface->fQueryCounter = noOpGLQueryCounter; | 867 interface->fQueryCounter = noOpGLQueryCounter; |
855 interface->fReadBuffer = noOpGLReadBuffer; | 868 interface->fReadBuffer = noOpGLReadBuffer; |
856 interface->fReadPixels = debugGLReadPixels; | 869 interface->fReadPixels = debugGLReadPixels; |
857 interface->fScissor = noOpGLScissor; | 870 interface->fScissor = noOpGLScissor; |
858 interface->fShaderSource = noOpGLShaderSource; | 871 interface->fShaderSource = noOpGLShaderSource; |
859 interface->fStencilFunc = noOpGLStencilFunc; | 872 interface->fStencilFunc = noOpGLStencilFunc; |
860 interface->fStencilFuncSeparate = noOpGLStencilFuncSeparate; | 873 interface->fStencilFuncSeparate = noOpGLStencilFuncSeparate; |
861 interface->fStencilMask = noOpGLStencilMask; | 874 interface->fStencilMask = noOpGLStencilMask; |
862 interface->fStencilMaskSeparate = noOpGLStencilMaskSeparate; | 875 interface->fStencilMaskSeparate = noOpGLStencilMaskSeparate; |
863 interface->fStencilOp = noOpGLStencilOp; | 876 interface->fStencilOp = noOpGLStencilOp; |
864 interface->fStencilOpSeparate = noOpGLStencilOpSeparate; | 877 interface->fStencilOpSeparate = noOpGLStencilOpSeparate; |
| 878 interface->fTexGenf = noOpGLTexGenf; |
| 879 interface->fTexGenfv = noOpGLTexGenfv; |
| 880 interface->fTexGeni = noOpGLTexGeni; |
865 interface->fTexImage2D = noOpGLTexImage2D; | 881 interface->fTexImage2D = noOpGLTexImage2D; |
866 interface->fTexParameteri = noOpGLTexParameteri; | 882 interface->fTexParameteri = noOpGLTexParameteri; |
867 interface->fTexParameteriv = noOpGLTexParameteriv; | 883 interface->fTexParameteriv = noOpGLTexParameteriv; |
868 interface->fTexSubImage2D = noOpGLTexSubImage2D; | 884 interface->fTexSubImage2D = noOpGLTexSubImage2D; |
869 interface->fTexStorage2D = noOpGLTexStorage2D; | 885 interface->fTexStorage2D = noOpGLTexStorage2D; |
870 interface->fDiscardFramebuffer = noOpGLDiscardFramebuffer; | 886 interface->fDiscardFramebuffer = noOpGLDiscardFramebuffer; |
871 interface->fUniform1f = noOpGLUniform1f; | 887 interface->fUniform1f = noOpGLUniform1f; |
872 interface->fUniform1i = noOpGLUniform1i; | 888 interface->fUniform1i = noOpGLUniform1i; |
873 interface->fUniform1fv = noOpGLUniform1fv; | 889 interface->fUniform1fv = noOpGLUniform1fv; |
874 interface->fUniform1iv = noOpGLUniform1iv; | 890 interface->fUniform1iv = noOpGLUniform1iv; |
875 interface->fUniform2f = noOpGLUniform2f; | 891 interface->fUniform2f = noOpGLUniform2f; |
876 interface->fUniform2i = noOpGLUniform2i; | 892 interface->fUniform2i = noOpGLUniform2i; |
877 interface->fUniform2fv = noOpGLUniform2fv; | 893 interface->fUniform2fv = noOpGLUniform2fv; |
878 interface->fUniform2iv = noOpGLUniform2iv; | 894 interface->fUniform2iv = noOpGLUniform2iv; |
879 interface->fUniform3f = noOpGLUniform3f; | 895 interface->fUniform3f = noOpGLUniform3f; |
880 interface->fUniform3i = noOpGLUniform3i; | 896 interface->fUniform3i = noOpGLUniform3i; |
881 interface->fUniform3fv = noOpGLUniform3fv; | 897 interface->fUniform3fv = noOpGLUniform3fv; |
882 interface->fUniform3iv = noOpGLUniform3iv; | 898 interface->fUniform3iv = noOpGLUniform3iv; |
883 interface->fUniform4f = noOpGLUniform4f; | 899 interface->fUniform4f = noOpGLUniform4f; |
884 interface->fUniform4i = noOpGLUniform4i; | 900 interface->fUniform4i = noOpGLUniform4i; |
885 interface->fUniform4fv = noOpGLUniform4fv; | 901 interface->fUniform4fv = noOpGLUniform4fv; |
886 interface->fUniform4iv = noOpGLUniform4iv; | 902 interface->fUniform4iv = noOpGLUniform4iv; |
887 interface->fUniformMatrix2fv = noOpGLUniformMatrix2fv; | 903 interface->fUniformMatrix2fv = noOpGLUniformMatrix2fv; |
888 interface->fUniformMatrix3fv = noOpGLUniformMatrix3fv; | 904 interface->fUniformMatrix3fv = noOpGLUniformMatrix3fv; |
889 interface->fUniformMatrix4fv = noOpGLUniformMatrix4fv; | 905 interface->fUniformMatrix4fv = noOpGLUniformMatrix4fv; |
890 interface->fUseProgram = debugGLUseProgram; | 906 interface->fUseProgram = debugGLUseProgram; |
891 interface->fVertexAttrib4fv = noOpGLVertexAttrib4fv; | 907 interface->fVertexAttrib4fv = noOpGLVertexAttrib4fv; |
892 interface->fVertexAttribPointer = noOpGLVertexAttribPointer; | 908 interface->fVertexAttribPointer = noOpGLVertexAttribPointer; |
| 909 interface->fVertexPointer = noOpGLVertexPointer; |
893 interface->fViewport = noOpGLViewport; | 910 interface->fViewport = noOpGLViewport; |
894 interface->fBindFramebuffer = debugGLBindFramebuffer; | 911 interface->fBindFramebuffer = debugGLBindFramebuffer; |
895 interface->fBindRenderbuffer = debugGLBindRenderbuffer; | 912 interface->fBindRenderbuffer = debugGLBindRenderbuffer; |
896 interface->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus; | 913 interface->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus; |
897 interface->fDeleteFramebuffers = debugGLDeleteFramebuffers; | 914 interface->fDeleteFramebuffers = debugGLDeleteFramebuffers; |
898 interface->fDeleteRenderbuffers = debugGLDeleteRenderbuffers; | 915 interface->fDeleteRenderbuffers = debugGLDeleteRenderbuffers; |
899 interface->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer; | 916 interface->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer; |
900 interface->fFramebufferTexture2D = debugGLFramebufferTexture2D; | 917 interface->fFramebufferTexture2D = debugGLFramebufferTexture2D; |
901 interface->fGenFramebuffers = debugGLGenFramebuffers; | 918 interface->fGenFramebuffers = debugGLGenFramebuffers; |
902 interface->fGenRenderbuffers = debugGLGenRenderbuffers; | 919 interface->fGenRenderbuffers = debugGLGenRenderbuffers; |
903 interface->fGetFramebufferAttachmentParameteriv = | 920 interface->fGetFramebufferAttachmentParameteriv = |
904 noOpGLGetFramebufferAttachmentParameteriv; | 921 noOpGLGetFramebufferAttachmentParameteriv; |
905 interface->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv; | 922 interface->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv; |
906 interface->fRenderbufferStorage = noOpGLRenderbufferStorage; | 923 interface->fRenderbufferStorage = noOpGLRenderbufferStorage; |
907 interface->fRenderbufferStorageMultisample = | 924 interface->fRenderbufferStorageMultisample = |
908 noOpGLRenderbufferStorageMultisample; | 925 noOpGLRenderbufferStorageMultisample; |
909 interface->fBlitFramebuffer = noOpGLBlitFramebuffer; | 926 interface->fBlitFramebuffer = noOpGLBlitFramebuffer; |
910 interface->fResolveMultisampleFramebuffer = | 927 interface->fResolveMultisampleFramebuffer = |
911 noOpGLResolveMultisampleFramebuffer; | 928 noOpGLResolveMultisampleFramebuffer; |
912 interface->fMapBuffer = debugGLMapBuffer; | 929 interface->fMapBuffer = debugGLMapBuffer; |
913 interface->fUnmapBuffer = debugGLUnmapBuffer; | 930 interface->fUnmapBuffer = debugGLUnmapBuffer; |
914 interface->fBindFragDataLocationIndexed = | 931 interface->fBindFragDataLocationIndexed = |
915 noOpGLBindFragDataLocationIndexed; | 932 noOpGLBindFragDataLocationIndexed; |
916 | 933 |
917 return interface; | 934 return interface; |
918 } | 935 } |
OLD | NEW |