Fix gcc version checks for _mesa_bitcount
[mesa.git] / src / mesa / main / getstring.c
index 3910047fb5d073863f2351a132a6976307ed5150..c381fb2dfdf6047c4d96bbbc7fa3957a01f0c3fe 100644 (file)
 #include "get.h"
 #include "enums.h"
 #include "extensions.h"
+#include "mfeatures.h"
+#include "mtypes.h"
 
 
 /**
  * Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query.
  */
 static const GLubyte *
-shading_language_version(GLcontext *ctx)
+shading_language_version(struct gl_context *ctx)
 {
    switch (ctx->API) {
    case API_OPENGL:
@@ -233,7 +235,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
  * Returns the current GL error code, or GL_NO_ERROR.
  * \return current error code
  *
- * Returns __GLcontextRec::ErrorValue.
+ * Returns __struct gl_contextRec::ErrorValue.
  */
 GLenum GLAPIENTRY
 _mesa_GetError( void )
@@ -249,3 +251,20 @@ _mesa_GetError( void )
    ctx->ErrorDebugCount = 0;
    return e;
 }
+
+/**
+ * Returns an error code specified by GL_ARB_robustness, or GL_NO_ERROR.
+ * \return current context status
+ */
+GLenum GLAPIENTRY
+_mesa_GetGraphicsResetStatusARB( void )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLenum status = ctx->ResetStatus;
+
+   if (MESA_VERBOSE & VERBOSE_API)
+      _mesa_debug(ctx, "glGetGraphicsResetStatusARB"
+                       "(always returns GL_NO_ERROR)\n");
+
+   return status;
+}