[Mesa-dev] [PATCH 2/2] mesa/tests: Add ES1.1 dispatch table sanity test

Ian Romanick idr at freedesktop.org
Tue Oct 16 11:17:44 PDT 2012


From: Ian Romanick <ian.d.romanick at intel.com>

This test actually depends on FEATURE_ES1 because
_mesa_create_exec_table_es1 doesn't exist without it.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Paul Berry <stereotype441 at gmail.com>
---
 src/mesa/main/tests/dispatch_sanity.cpp | 207 ++++++++++++++++++++++++++++++++
 1 file changed, 207 insertions(+)

diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index a1d0223..b4de515 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -74,6 +74,11 @@ struct function {
 
 extern const struct function gles2_functions_possible[];
 
+#if FEATURE_ES1
+extern "C" _glapi_table *_mesa_create_exec_table_es1(void);
+extern const struct function gles11_functions_possible[];
+#endif /* FEATURE_ES1 */
+
 class DispatchSanity_test : public ::testing::Test {
 public:
    virtual void SetUp();
@@ -138,6 +143,14 @@ TEST_F(DispatchSanity_test, GLES2)
    validate_functions((_glapi_proc *) ctx.Exec, gles2_functions_possible);
 }
 
+#if FEATURE_ES1
+TEST_F(DispatchSanity_test, GLES11)
+{
+   _glapi_proc *exec = (_glapi_proc *) _mesa_create_exec_table_es1();
+   validate_functions(exec, gles11_functions_possible);
+}
+#endif /* FEATURE_ES1 */
+
 const struct function gles2_functions_possible[] = {
    { "glActiveTexture", _gloffset_ActiveTextureARB },
    { "glAttachShader", -1 },
@@ -304,3 +317,197 @@ const struct function gles2_functions_possible[] = {
    { "glViewport", _gloffset_Viewport },
    { NULL, -1 }
 };
+
+#if FEATURE_ES1
+const struct function gles11_functions_possible[] = {
+   { "glActiveTexture", _gloffset_ActiveTextureARB },
+   { "glAlphaFunc", _gloffset_AlphaFunc },
+   { "glAlphaFuncx", -1 },
+   { "glBindBuffer", -1 },
+   { "glBindFramebufferOES", -1 },
+   { "glBindRenderbufferOES", -1 },
+   { "glBindTexture", _gloffset_BindTexture },
+   { "glBlendEquationOES", _gloffset_BlendEquation },
+   { "glBlendEquationSeparateOES", -1 },
+   { "glBlendFunc", _gloffset_BlendFunc },
+   { "glBlendFuncSeparateOES", -1 },
+   { "glBufferData", -1 },
+   { "glBufferSubData", -1 },
+   { "glCheckFramebufferStatusOES", -1 },
+   { "glClear", _gloffset_Clear },
+   { "glClearColor", _gloffset_ClearColor },
+   { "glClearColorx", -1 },
+   { "glClearDepthf", -1 },
+   { "glClearDepthx", -1 },
+   { "glClearStencil", _gloffset_ClearStencil },
+   { "glClientActiveTexture", _gloffset_ClientActiveTextureARB },
+   { "glClipPlanef", -1 },
+   { "glClipPlanex", -1 },
+   { "glColor4f", _gloffset_Color4f },
+   { "glColor4ub", _gloffset_Color4ub },
+   { "glColor4x", -1 },
+   { "glColorMask", _gloffset_ColorMask },
+   { "glColorPointer", _gloffset_ColorPointer },
+   { "glCompressedTexImage2D", -1 },
+   { "glCompressedTexSubImage2D", -1 },
+   { "glCopyTexImage2D", _gloffset_CopyTexImage2D },
+   { "glCopyTexSubImage2D", _gloffset_CopyTexSubImage2D },
+   { "glCullFace", _gloffset_CullFace },
+   { "glDeleteBuffers", -1 },
+   { "glDeleteFramebuffersOES", -1 },
+   { "glDeleteRenderbuffersOES", -1 },
+   { "glDeleteTextures", _gloffset_DeleteTextures },
+   { "glDepthFunc", _gloffset_DepthFunc },
+   { "glDepthMask", _gloffset_DepthMask },
+   { "glDepthRangef", -1 },
+   { "glDepthRangex", -1 },
+   { "glDisable", _gloffset_Disable },
+   { "glDisableClientState", _gloffset_DisableClientState },
+   { "glDrawArrays", _gloffset_DrawArrays },
+   { "glDrawElements", _gloffset_DrawElements },
+   { "glDrawTexfOES", -1 },
+   { "glDrawTexfvOES", -1 },
+   { "glDrawTexiOES", -1 },
+   { "glDrawTexivOES", -1 },
+   { "glDrawTexsOES", -1 },
+   { "glDrawTexsvOES", -1 },
+   { "glDrawTexxOES", -1 },
+   { "glDrawTexxvOES", -1 },
+   { "glEGLImageTargetRenderbufferStorageOES", -1 },
+   { "glEGLImageTargetTexture2DOES", -1 },
+   { "glEnable", _gloffset_Enable },
+   { "glEnableClientState", _gloffset_EnableClientState },
+   { "glFinish", _gloffset_Finish },
+   { "glFlush", _gloffset_Flush },
+   { "glFogf", _gloffset_Fogf },
+   { "glFogfv", _gloffset_Fogfv },
+   { "glFogx", -1 },
+   { "glFogxv", -1 },
+   { "glFramebufferRenderbufferOES", -1 },
+   { "glFramebufferTexture2DOES", -1 },
+   { "glFrontFace", _gloffset_FrontFace },
+   { "glFrustumf", -1 },
+   { "glFrustumx", -1 },
+   { "glGenBuffers", -1 },
+   { "glGenFramebuffersOES", -1 },
+   { "glGenRenderbuffersOES", -1 },
+   { "glGenTextures", _gloffset_GenTextures },
+   { "glGenerateMipmapOES", -1 },
+   { "glGetBooleanv", _gloffset_GetBooleanv },
+   { "glGetBufferParameteriv", -1 },
+   { "glGetBufferPointervOES", -1 },
+   { "glGetClipPlanef", -1 },
+   { "glGetClipPlanex", -1 },
+   { "glGetError", _gloffset_GetError },
+   { "glGetFixedv", -1 },
+   { "glGetFloatv", _gloffset_GetFloatv },
+   { "glGetFramebufferAttachmentParameterivOES", -1 },
+   { "glGetIntegerv", _gloffset_GetIntegerv },
+   { "glGetLightfv", _gloffset_GetLightfv },
+   { "glGetLightxv", -1 },
+   { "glGetMaterialfv", _gloffset_GetMaterialfv },
+   { "glGetMaterialxv", -1 },
+   { "glGetPointerv", _gloffset_GetPointerv },
+   { "glGetRenderbufferParameterivOES", -1 },
+   { "glGetString", _gloffset_GetString },
+   { "glGetTexEnvfv", _gloffset_GetTexEnvfv },
+   { "glGetTexEnviv", _gloffset_GetTexEnviv },
+   { "glGetTexEnvxv", -1 },
+   { "glGetTexGenfvOES", _gloffset_GetTexGenfv },
+   { "glGetTexGenivOES", _gloffset_GetTexGeniv },
+   { "glGetTexGenxvOES", -1 },
+   { "glGetTexParameterfv", _gloffset_GetTexParameterfv },
+   { "glGetTexParameteriv", _gloffset_GetTexParameteriv },
+   { "glGetTexParameterxv", -1 },
+   { "glHint", _gloffset_Hint },
+   { "glIsBuffer", -1 },
+   { "glIsEnabled", _gloffset_IsEnabled },
+   { "glIsFramebufferOES", -1 },
+   { "glIsRenderbufferOES", -1 },
+   { "glIsTexture", _gloffset_IsTexture },
+   { "glLightModelf", _gloffset_LightModelf },
+   { "glLightModelfv", _gloffset_LightModelfv },
+   { "glLightModelx", -1 },
+   { "glLightModelxv", -1 },
+   { "glLightf", _gloffset_Lightf },
+   { "glLightfv", _gloffset_Lightfv },
+   { "glLightx", -1 },
+   { "glLightxv", -1 },
+   { "glLineWidth", _gloffset_LineWidth },
+   { "glLineWidthx", -1 },
+   { "glLoadIdentity", _gloffset_LoadIdentity },
+   { "glLoadMatrixf", _gloffset_LoadMatrixf },
+   { "glLoadMatrixx", -1 },
+   { "glLogicOp", _gloffset_LogicOp },
+   { "glMapBufferOES", -1 },
+   { "glMaterialf", _gloffset_Materialf },
+   { "glMaterialfv", _gloffset_Materialfv },
+   { "glMaterialx", -1 },
+   { "glMaterialxv", -1 },
+   { "glMatrixMode", _gloffset_MatrixMode },
+   { "glMultMatrixf", _gloffset_MultMatrixf },
+   { "glMultMatrixx", -1 },
+   { "glMultiDrawArraysEXT", -1 },
+   { "glMultiDrawElementsEXT", -1 },
+   { "glMultiTexCoord4f", _gloffset_MultiTexCoord4fARB },
+   { "glMultiTexCoord4x", -1 },
+   { "glNormal3f", _gloffset_Normal3f },
+   { "glNormal3x", -1 },
+   { "glNormalPointer", _gloffset_NormalPointer },
+   { "glOrthof", -1 },
+   { "glOrthox", -1 },
+   { "glPixelStorei", _gloffset_PixelStorei },
+   { "glPointParameterf", -1 },
+   { "glPointParameterfv", -1 },
+   { "glPointParameterx", -1 },
+   { "glPointParameterxv", -1 },
+   { "glPointSize", _gloffset_PointSize },
+   { "glPointSizePointerOES", -1 },
+   { "glPointSizex", -1 },
+   { "glPolygonOffset", _gloffset_PolygonOffset },
+   { "glPolygonOffsetx", -1 },
+   { "glPopMatrix", _gloffset_PopMatrix },
+   { "glPushMatrix", _gloffset_PushMatrix },
+   { "glQueryMatrixxOES", -1 },
+   { "glReadPixels", _gloffset_ReadPixels },
+   { "glRenderbufferStorageOES", -1 },
+   { "glRotatef", _gloffset_Rotatef },
+   { "glRotatex", -1 },
+   { "glSampleCoverage", -1 },
+   { "glSampleCoveragex", -1 },
+   { "glScalef", _gloffset_Scalef },
+   { "glScalex", -1 },
+   { "glScissor", _gloffset_Scissor },
+   { "glShadeModel", _gloffset_ShadeModel },
+   { "glStencilFunc", _gloffset_StencilFunc },
+   { "glStencilMask", _gloffset_StencilMask },
+   { "glStencilOp", _gloffset_StencilOp },
+   { "glTexCoordPointer", _gloffset_TexCoordPointer },
+   { "glTexEnvf", _gloffset_TexEnvf },
+   { "glTexEnvfv", _gloffset_TexEnvfv },
+   { "glTexEnvi", _gloffset_TexEnvi },
+   { "glTexEnviv", _gloffset_TexEnviv },
+   { "glTexEnvx", -1 },
+   { "glTexEnvxv", -1 },
+   { "glTexGenfOES", _gloffset_TexGenf },
+   { "glTexGenfvOES", _gloffset_TexGenfv },
+   { "glTexGeniOES", _gloffset_TexGeni },
+   { "glTexGenivOES", _gloffset_TexGeniv },
+   { "glTexGenxOES", -1 },
+   { "glTexGenxvOES", -1 },
+   { "glTexImage2D", _gloffset_TexImage2D },
+   { "glTexParameterf", _gloffset_TexParameterf },
+   { "glTexParameterfv", _gloffset_TexParameterfv },
+   { "glTexParameteri", _gloffset_TexParameteri },
+   { "glTexParameteriv", _gloffset_TexParameteriv },
+   { "glTexParameterx", -1 },
+   { "glTexParameterxv", -1 },
+   { "glTexSubImage2D", _gloffset_TexSubImage2D },
+   { "glTranslatef", _gloffset_Translatef },
+   { "glTranslatex", -1 },
+   { "glUnmapBufferOES", -1 },
+   { "glVertexPointer", _gloffset_VertexPointer },
+   { "glViewport", _gloffset_Viewport },
+   { NULL, -1 }
+};
+#endif /* FEATURE_ES1 */
-- 
1.7.11.4



More information about the mesa-dev mailing list