[g3dvl] move z-coord generation for multiple render targets into vertex shader
[mesa.git] / src / mesa / drivers / dri / intel / intel_pixel.c
index a30014165593439d1e203de686db399f6bb5a096..d5c35775ce4a4409b92970cb6a7713c01ae2a1e7 100644 (file)
 #include "main/state.h"
 #include "main/bufferobj.h"
 #include "main/context.h"
-#include "main/enable.h"
-#include "main/matrix.h"
-#include "main/texstate.h"
-#include "main/varray.h"
-#include "main/viewport.h"
 #include "swrast/swrast.h"
-#include "shader/arbprogram.h"
-#include "shader/program.h"
 
 #include "intel_context.h"
 #include "intel_pixel.h"
@@ -62,7 +55,7 @@ effective_func(GLenum func, GLboolean src_alpha_is_one)
  * glDraw/CopyPixels.
  */
 GLboolean
-intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one)
+intel_check_blit_fragment_ops(struct gl_context * ctx, GLboolean src_alpha_is_one)
 {
    if (ctx->NewState)
       _mesa_update_state(ctx);
@@ -88,10 +81,10 @@ intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one)
       return GL_FALSE;
    }
 
-   if (!(ctx->Color.ColorMask[0] &&
-        ctx->Color.ColorMask[1] &&
-        ctx->Color.ColorMask[2] &&
-        ctx->Color.ColorMask[3])) {
+   if (!(ctx->Color.ColorMask[0][0] &&
+        ctx->Color.ColorMask[0][1] &&
+        ctx->Color.ColorMask[0][2] &&
+        ctx->Color.ColorMask[0][3])) {
       DBG("fallback due to color masking\n");
       return GL_FALSE;
    }
@@ -129,20 +122,6 @@ intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one)
    return GL_TRUE;
 }
 
-
-GLboolean
-intel_check_meta_tex_fragment_ops(GLcontext * ctx)
-{
-   if (ctx->NewState)
-      _mesa_update_state(ctx);
-
-   /* Some of _ImageTransferState (scale, bias) could be done with
-    * fragment programs on i915.
-    */
-   return !(ctx->_ImageTransferState || ctx->Fog.Enabled ||     /* not done yet */
-            ctx->Texture._EnabledUnits || ctx->FragmentProgram._Enabled);
-}
-
 /* The intel_region struct doesn't really do enough to capture the
  * format of the pixels in the region.  For now this code assumes that
  * the region is a display surface and hence is either ARGB8888 or
@@ -168,10 +147,9 @@ intel_check_blit_format(struct intel_region * region,
       return GL_TRUE;
    }
 
-   if (INTEL_DEBUG & DEBUG_PIXEL)
-      fprintf(stderr, "%s: bad format for blit (cpp %d, type %s format %s)\n",
-              __FUNCTION__, region->cpp,
-              _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format));
+   DBG("%s: bad format for blit (cpp %d, type %s format %s)\n",
+       __FUNCTION__, region->cpp,
+       _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format));
 
    return GL_FALSE;
 }