more cliprect elimination (swrast span)
authorRoland Scheidegger <sroland@tungstengraphics.com>
Mon, 16 Jul 2007 13:53:23 +0000 (15:53 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Mon, 16 Jul 2007 13:53:23 +0000 (15:53 +0200)
src/mesa/drivers/dri/i915tex/intel_span.c

index 74f118121c1e8e329d806402d903eeaa58b1ccd7..5a978d9ce265bced2b7737e2ebaa1652996cd7c2 100644 (file)
@@ -47,7 +47,6 @@
 #define DBG 0
 
 #define LOCAL_VARS                                                     \
-   struct intel_context *intel = intel_context(ctx);                   \
    struct intel_renderbuffer *irb = intel_renderbuffer(rb);            \
    const GLint yScale = irb->RenderToTexture ? 1 : -1;                 \
    const GLint yBias = irb->RenderToTexture ? 0 : irb->Base.Height - 1;        \
    assert(irb->pfMap);\
    (void) p;
 
-/* XXX FBO: this is identical to the macro in spantmp2.h except we get
- * the cliprect info from the context, not the driDrawable.
- * Move this into spantmp2.h someday.
+/* There is just a single cliploop!
  */
 #define HW_CLIPLOOP()                                                  \
    do {                                                                        \
-      int _nc = intel->numClipRects;                                   \
-      while ( _nc-- ) {                                                        \
-        int minx = intel->pClipRects[_nc].x1;          \
-        int miny = intel->pClipRects[_nc].y1;          \
-        int maxx = intel->pClipRects[_nc].x2;          \
-        int maxy = intel->pClipRects[_nc].y2;
-
+      int minx = 0;                                                    \
+      int miny = 0;                                                    \
+      int maxx = irb->Base.Width - 1;                                  \
+      int maxy = irb->Base.Height - 1;
 
+#define HW_ENDCLIPLOOP()                                               \
+   } while (0)
 
 
 #define Y_FLIP(_y) ((_y) * yScale + yBias)
 
 
 #define LOCAL_DEPTH_VARS                                               \
-   struct intel_context *intel = intel_context(ctx);                   \
    struct intel_renderbuffer *irb = intel_renderbuffer(rb);            \
    const GLuint pitch = irb->pfPitch/***XXX region->pitch*/; /* in pixels */ \
    const GLint yScale = irb->RenderToTexture ? 1 : -1;                 \