[Mesa-dev] [PATCH v2 05/12] mesa: add API_NUM

Imre Deak imre.deak at intel.com
Sun Sep 9 23:41:41 PDT 2012


Needed by the next patch.

Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 src/mesa/main/context.c |    2 ++
 src/mesa/main/mtypes.h  |    2 ++
 src/mesa/main/version.c |    3 +++
 3 files changed, 7 insertions(+)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 6b28690..1167ea5 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1040,6 +1040,8 @@ _mesa_initialize_context(struct gl_context *ctx,
       ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
       ctx->Point.PointSprite = GL_TRUE;  /* always on for ES 2.x */
       break;
+   default:
+      _mesa_problem(ctx, "Unknown API %d\n", ctx->API);
    }
 
    ctx->FirstTimeCurrent = GL_TRUE;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ba43e57..5fc3b8e 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3340,6 +3340,8 @@ typedef enum
    API_OPENGLES,
    API_OPENGLES2,
    API_OPENGL_CORE,
+
+   API_NUM,
 } gl_api;
 
 /**
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index bc7b1fa..7deb614 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -322,6 +322,9 @@ _mesa_compute_version(struct gl_context *ctx)
    case API_OPENGLES2:
       compute_version_es2(ctx);
       break;
+   default:
+      _mesa_problem(ctx, "unknown or unsupported API");
+      break;
    }
 
 }
-- 
1.7.9.5



More information about the mesa-dev mailing list