mesa: remove ARB_transpose_matrix extension enable flag
[mesa.git] / src / mesa / main / drawpix.c
index def55dddde1f1cca88d433bcc46185f4126ddf4f..8836e0a0e9957c252e3652f8cf86684eaccc33df 100644 (file)
@@ -35,9 +35,8 @@
 #include "pbo.h"
 #include "state.h"
 #include "dispatch.h"
-
-
-#if FEATURE_drawpix
+#include "glformats.h"
+#include "fbobject.h"
 
 
 /*
@@ -89,7 +88,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
     * input), NVIDIA's implementation also just returns this error despite
     * exposing GL_EXT_texture_integer, just return an error regardless.
     */
-   if (_mesa_is_integer_format(format)) {
+   if (_mesa_is_enum_format_integer(format)) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(integer format)");
       goto end;
    }
@@ -239,8 +238,9 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
       goto end;
    }
 
-   if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
-      _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+   if (_mesa_is_user_fbo(ctx->ReadBuffer) &&
+       ctx->ReadBuffer->Visual.samples > 0) {
+      _mesa_error(ctx, GL_INVALID_OPERATION,
                  "glCopyPixels(multisample FBO)");
       goto end;
    }
@@ -344,7 +344,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
          ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
       }
    }
-#if _HAVE_FULL_GL
    else if (ctx->RenderMode == GL_FEEDBACK) {
       FLUSH_CURRENT(ctx, 0);
       _mesa_feedback_token( ctx, (GLfloat) (GLint) GL_BITMAP_TOKEN );
@@ -357,7 +356,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
       ASSERT(ctx->RenderMode == GL_SELECT);
       /* Do nothing.  See OpenGL Spec, Appendix B, Corollary 6. */
    }
-#endif
 
    /* update raster position */
    ctx->Current.RasterPos[0] += xmove;
@@ -376,6 +374,3 @@ _mesa_init_drawpix_dispatch(struct _glapi_table *disp)
    SET_CopyPixels(disp, _mesa_CopyPixels);
    SET_DrawPixels(disp, _mesa_DrawPixels);
 }
-
-
-#endif /* FEATURE_drawpix */