moved device driver DrawPixels call
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 3 Mar 2000 15:39:13 +0000 (15:39 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 3 Mar 2000 15:39:13 +0000 (15:39 +0000)
src/mesa/main/drawpix.c

index 38de1a0434a49edf42b9ba9e0b0419f48fc4368f..56ee2d76e38bfa88e8b472f756fc0e8b0e004873 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.12 2000/02/08 23:42:14 brianp Exp $ */
+/* $Id: drawpix.c,v 1.13 2000/03/03 15:39:13 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -117,13 +117,6 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
       gl_update_state(ctx);
    }
 
-   /* see if device driver can do the drawpix */
-   if (ctx->Driver.DrawPixels
-       && (*ctx->Driver.DrawPixels)(ctx, x, y, width, height, format, type,
-                                    unpack, pixels)) {
-      return GL_TRUE;
-   }
-
    if ((ctx->RasterMask&(~(SCISSOR_BIT|WINCLIP_BIT)))==0
        && ctx->Pixel.RedBias==0.0 && ctx->Pixel.RedScale==1.0
        && ctx->Pixel.GreenBias==0.0 && ctx->Pixel.GreenScale==1.0
@@ -694,6 +687,13 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
       x = (GLint) (ctx->Current.RasterPos[0] + 0.5F);
       y = (GLint) (ctx->Current.RasterPos[1] + 0.5F);
 
+      /* see if device driver can do the drawpix */
+      if (ctx->Driver.DrawPixels
+          && (*ctx->Driver.DrawPixels)(ctx, x, y, width, height, format, type,
+                                       &ctx->Unpack, pixels)) {
+         return;
+      }
+
       switch (format) {
         case GL_STENCIL_INDEX:
            draw_stencil_pixels( ctx, x, y, width, height, type, pixels );