summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-01-29 17:37:02 -0800
committerMatt Turner <[email protected]>2013-03-19 12:04:32 -0700
commit322c840bea5838782f927a2c1d1711b0d7d50d29 (patch)
tree27e87a18b6535e27b277c57a6e11643e2e3c02f4 /src
parent569bd281c1f5c3b64f4caab2c76611dfa2e6948c (diff)
gles2: Add an ABI-check test
Checks that no functions are exported that are not part of the ABI. Note that currently we are exporting functions that are aliased to functions that are part of the ABI. They shouldn't be exported, but the XML descriptions don't adequately describe this case.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/mapi/es2api/ABI-check292
-rw-r--r--src/mapi/es2api/Makefile.am2
2 files changed, 294 insertions, 0 deletions
diff --git a/src/mapi/es2api/ABI-check b/src/mapi/es2api/ABI-check
new file mode 100755
index 00000000000..4a61050059b
--- /dev/null
+++ b/src/mapi/es2api/ABI-check
@@ -0,0 +1,292 @@
+#!/bin/bash
+
+# Print defined gl.* functions not in GL ES 3.0 or in
+# (FIXME, none of these should be part of the ABI)
+# GL_EXT_discard_framebuffer
+# GL_EXT_map_buffer_range
+# GL_EXT_multi_draw_arrays
+# GL_NV_draw_buffers
+# GL_NV_read_buffer
+# GL_OES_EGL_image
+# GL_OES_get_program_binary
+# GL_OES_mapbuffer
+# GL_OES_texture_3D
+# GL_OES_vertex_array_object
+
+FUNCS=$(nm -D --defined-only ${1-.libs/libGLESv2.so.2} | grep -o 'T gl.*' | cut -c 3- | while read func; do
+( grep -q "^$func$" || echo $func ) <<EOF
+glActiveTexture
+glAttachShader
+glBeginQuery
+glBeginTransformFeedback
+glBindAttribLocation
+glBindBuffer
+glBindBufferBase
+glBindBufferRange
+glBindFramebuffer
+glBindRenderbuffer
+glBindSampler
+glBindTexture
+glBindTransformFeedback
+glBindVertexArray
+glBindVertexArrayOES
+glBlendColor
+glBlendEquation
+glBlendEquationSeparate
+glBlendFunc
+glBlendFuncSeparate
+glBlitFramebuffer
+glBufferData
+glBufferSubData
+glCheckFramebufferStatus
+glClear
+glClearBufferfi
+glClearBufferfv
+glClearBufferiv
+glClearBufferuiv
+glClearColor
+glClearDepthf
+glClearStencil
+glClientWaitSync
+glColorMask
+glCompileShader
+glCompressedTexImage2D
+glCompressedTexImage3D
+glCompressedTexImage3DOES
+glCompressedTexSubImage2D
+glCompressedTexSubImage3D
+glCompressedTexSubImage3DOES
+glCopyBufferSubData
+glCopyTexImage2D
+glCopyTexSubImage2D
+glCopyTexSubImage3D
+glCopyTexSubImage3DOES
+glCreateProgram
+glCreateShader
+glCullFace
+glDeleteBuffers
+glDeleteFramebuffers
+glDeleteProgram
+glDeleteQueries
+glDeleteRenderbuffers
+glDeleteSamplers
+glDeleteShader
+glDeleteSync
+glDeleteTextures
+glDeleteTransformFeedbacks
+glDeleteVertexArrays
+glDeleteVertexArraysOES
+glDepthFunc
+glDepthMask
+glDepthRangef
+glDetachShader
+glDisable
+glDisableVertexAttribArray
+glDiscardFramebufferEXT
+glDrawArrays
+glDrawArraysInstanced
+glDrawBuffers
+glDrawBuffersNV
+glDrawElements
+glDrawElementsInstanced
+glDrawRangeElements
+glEGLImageTargetRenderbufferStorageOES
+glEGLImageTargetTexture2DOES
+glEnable
+glEnableVertexAttribArray
+glEndQuery
+glEndTransformFeedback
+glFenceSync
+glFinish
+glFlush
+glFlushMappedBufferRange
+glFlushMappedBufferRangeEXT
+glFramebufferRenderbuffer
+glFramebufferTexture2D
+glFramebufferTexture3DOES
+glFramebufferTextureLayer
+glFrontFace
+glGenBuffers
+glGenerateMipmap
+glGenFramebuffers
+glGenQueries
+glGenRenderbuffers
+glGenSamplers
+glGenTextures
+glGenTransformFeedbacks
+glGenVertexArrays
+glGenVertexArraysOES
+glGetActiveAttrib
+glGetActiveUniform
+glGetActiveUniformBlockiv
+glGetActiveUniformBlockName
+glGetActiveUniformsiv
+glGetAttachedShaders
+glGetAttribLocation
+glGetBooleanv
+glGetBufferParameteri64v
+glGetBufferParameteriv
+glGetBufferPointerv
+glGetBufferPointervOES
+glGetError
+glGetFloatv
+glGetFragDataLocation
+glGetFramebufferAttachmentParameteriv
+glGetInteger64i_v
+glGetInteger64v
+glGetIntegeri_v
+glGetIntegerv
+glGetInternalformativ
+glGetProgramBinary
+glGetProgramBinaryOES
+glGetProgramInfoLog
+glGetProgramiv
+glGetQueryiv
+glGetQueryObjectuiv
+glGetRenderbufferParameteriv
+glGetSamplerParameterfv
+glGetSamplerParameteriv
+glGetShaderInfoLog
+glGetShaderiv
+glGetShaderPrecisionFormat
+glGetShaderSource
+glGetString
+glGetStringi
+glGetSynciv
+glGetTexParameterfv
+glGetTexParameteriv
+glGetTransformFeedbackVarying
+glGetUniformBlockIndex
+glGetUniformfv
+glGetUniformIndices
+glGetUniformiv
+glGetUniformLocation
+glGetUniformuiv
+glGetVertexAttribfv
+glGetVertexAttribIiv
+glGetVertexAttribIuiv
+glGetVertexAttribiv
+glGetVertexAttribPointerv
+glHint
+glInvalidateFramebuffer
+glInvalidateSubFramebuffer
+glIsBuffer
+glIsEnabled
+glIsFramebuffer
+glIsProgram
+glIsQuery
+glIsRenderbuffer
+glIsSampler
+glIsShader
+glIsSync
+glIsTexture
+glIsTransformFeedback
+glIsVertexArray
+glIsVertexArrayOES
+glLineWidth
+glLinkProgram
+glMapBufferOES
+glMapBufferRange
+glMapBufferRangeEXT
+glMultiDrawArraysEXT
+glMultiDrawElementsEXT
+glPauseTransformFeedback
+glPixelStorei
+glPolygonOffset
+glProgramBinary
+glProgramBinaryOES
+glProgramParameteri
+glReadBuffer
+glReadBufferNV
+glReadPixels
+glReleaseShaderCompiler
+glRenderbufferStorage
+glRenderbufferStorageMultisample
+glResumeTransformFeedback
+glSampleCoverage
+glSamplerParameterf
+glSamplerParameterfv
+glSamplerParameteri
+glSamplerParameteriv
+glScissor
+glShaderBinary
+glShaderSource
+glStencilFunc
+glStencilFuncSeparate
+glStencilMask
+glStencilMaskSeparate
+glStencilOp
+glStencilOpSeparate
+glTexImage2D
+glTexImage3D
+glTexImage3DOES
+glTexParameterf
+glTexParameterfv
+glTexParameteri
+glTexParameteriv
+glTexStorage2D
+glTexStorage3D
+glTexSubImage2D
+glTexSubImage3D
+glTexSubImage3DOES
+glTransformFeedbackVaryings
+glUniform1f
+glUniform1fv
+glUniform1i
+glUniform1iv
+glUniform1ui
+glUniform1uiv
+glUniform2f
+glUniform2fv
+glUniform2i
+glUniform2iv
+glUniform2ui
+glUniform2uiv
+glUniform3f
+glUniform3fv
+glUniform3i
+glUniform3iv
+glUniform3ui
+glUniform3uiv
+glUniform4f
+glUniform4fv
+glUniform4i
+glUniform4iv
+glUniform4ui
+glUniform4uiv
+glUniformBlockBinding
+glUniformMatrix2fv
+glUniformMatrix2x3fv
+glUniformMatrix2x4fv
+glUniformMatrix3fv
+glUniformMatrix3x2fv
+glUniformMatrix3x4fv
+glUniformMatrix4fv
+glUniformMatrix4x2fv
+glUniformMatrix4x3fv
+glUnmapBuffer
+glUnmapBufferOES
+glUseProgram
+glValidateProgram
+glVertexAttrib1f
+glVertexAttrib1fv
+glVertexAttrib2f
+glVertexAttrib2fv
+glVertexAttrib3f
+glVertexAttrib3fv
+glVertexAttrib4f
+glVertexAttrib4fv
+glVertexAttribDivisor
+glVertexAttribI4i
+glVertexAttribI4iv
+glVertexAttribI4ui
+glVertexAttribI4uiv
+glVertexAttribIPointer
+glVertexAttribPointer
+glViewport
+glWaitSync
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
diff --git a/src/mapi/es2api/Makefile.am b/src/mapi/es2api/Makefile.am
index 0538f736dfa..9f79536942d 100644
--- a/src/mapi/es2api/Makefile.am
+++ b/src/mapi/es2api/Makefile.am
@@ -28,6 +28,8 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(VISIBILITY_CFLAGS)
+TESTS = ABI-check
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = glesv2.pc