allow ARB vp/fp query program errors
authorDaniel Borca <dborca@users.sourceforge.net>
Mon, 20 Dec 2004 08:08:15 +0000 (08:08 +0000)
committerDaniel Borca <dborca@users.sourceforge.net>
Mon, 20 Dec 2004 08:08:15 +0000 (08:08 +0000)
src/mesa/main/get.c

index bbedf4cbd95f744d40cd85a56ddbda1fd7e37301..df6b91ef499e2c4bf74bd64b4435500b0339ad7b 100644 (file)
@@ -1440,7 +1440,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
             *params = GL_FALSE;
          break;
       case GL_PROGRAM_ERROR_POSITION_NV:
-         CHECK_EXTENSION_B(NV_vertex_program, pname);
+         CHECK_EXTENSION2_B(NV_vertex_program, ARB_vertex_program, pname);
          *params = (ctx->Program.ErrorPos != 0) ? GL_TRUE : GL_FALSE;
          break;
       case GL_VERTEX_ATTRIB_ARRAY0_NV:
@@ -3076,7 +3076,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
             *params = 0.0;
          break;
       case GL_PROGRAM_ERROR_POSITION_NV:
-         CHECK_EXTENSION_D(NV_vertex_program, pname);
+         CHECK_EXTENSION2_D(NV_vertex_program, ARB_vertex_program, pname);
          *params = (GLdouble) ctx->Program.ErrorPos;
          break;
       case GL_VERTEX_ATTRIB_ARRAY0_NV:
@@ -3365,7 +3365,6 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
          *params = (GLdouble) ctx->Const.ColorReadFormat;
          return;
 
-
 #if FEATURE_ATI_fragment_shader
       case GL_NUM_FRAGMENT_REGISTERS_ATI:
         CHECK_EXTENSION_D(ATI_fragment_shader, pname);
@@ -4689,7 +4688,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
             *params = 0.0;
          break;
       case GL_PROGRAM_ERROR_POSITION_NV:
-         CHECK_EXTENSION_F(NV_vertex_program, pname);
+         CHECK_EXTENSION2_F(NV_vertex_program, ARB_vertex_program, pname);
          *params = (GLfloat) ctx->Program.ErrorPos;
          break;
       case GL_VERTEX_ATTRIB_ARRAY0_NV:
@@ -6338,7 +6337,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
             *params = 0;
          break;
       case GL_PROGRAM_ERROR_POSITION_NV:
-         CHECK_EXTENSION_I(NV_vertex_program, pname);
+         CHECK_EXTENSION2_I(NV_vertex_program, ARB_vertex_program, pname);
          *params = (GLint) ctx->Program.ErrorPos;
          break;
       case GL_VERTEX_ATTRIB_ARRAY0_NV:
@@ -6853,9 +6852,13 @@ _mesa_GetString( GLenum name )
             if (!ctx->Extensions.String)
                ctx->Extensions.String = _mesa_make_extension_string(ctx);
             return (const GLubyte *) ctx->Extensions.String;
-#if FEATURE_NV_fragment_program
+#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program \
+    FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
          case GL_PROGRAM_ERROR_STRING_NV:
-            if (ctx->Extensions.NV_fragment_program) {
+            if (ctx->Extensions.NV_fragment_program ||
+                ctx->Extensions.ARB_fragment_program ||
+                ctx->Extensions.NV_vertex_program ||
+                ctx->Extensions.ARB_vertex_program) {
                return (const GLubyte *) ctx->Program.ErrorString;
             }
             /* FALL-THROUGH */