OSDN Git Service

back port span changes from i810, these have been in my tree for a while seem
authorDave Airlie <airliedfreedesktop.org>
Wed, 10 Mar 2004 03:43:15 +0000 (03:43 +0000)
committerDave Airlie <airliedfreedesktop.org>
Wed, 10 Mar 2004 03:43:15 +0000 (03:43 +0000)
fine ..

src/mesa/drivers/dri/i810/i810span.c
src/mesa/drivers/dri/i810/i810span.h

index dc8f4d1..53bd151 100644 (file)
@@ -14,6 +14,7 @@
 #define DBG 0
 
 #define LOCAL_VARS                                     \
+   i810ContextPtr imesa = I810_CONTEXT(ctx);           \
    __DRIdrawablePrivate *dPriv = imesa->driDrawable;   \
    i810ScreenPrivate *i810Screen = imesa->i810Screen;  \
    GLuint pitch = i810Screen->backPitch;               \
@@ -28,6 +29,7 @@
    (void) read_buf; (void) buf; (void) p
 
 #define LOCAL_DEPTH_VARS                               \
+   i810ContextPtr imesa = I810_CONTEXT(ctx);           \
    __DRIdrawablePrivate *dPriv = imesa->driDrawable;   \
    i810ScreenPrivate *i810Screen = imesa->i810Screen;  \
    GLuint pitch = i810Screen->backPitch;               \
 
 #define Y_FLIP(_y) (height - _y - 1)
 
-#define HW_LOCK()                              \
-   i810ContextPtr imesa = I810_CONTEXT(ctx);   \
-   I810_FIREVERTICES(imesa);                   \
-   i810DmaFinish(imesa);                       \
-   LOCK_HARDWARE_QUIESCENT(imesa);
+#define HW_LOCK()
 
 #define HW_CLIPLOOP()                                          \
   do {                                                         \
     }                                          \
   } while (0)
 
-#define HW_UNLOCK()                            \
-    UNLOCK_HARDWARE(imesa);
-
-
-
+#define HW_UNLOCK()
 
 /* 16 bit, 565 rgb color spanline and pixel functions
  */
@@ -148,6 +142,22 @@ static void i810SetBuffer(GLcontext *ctx, GLframebuffer *buffer,
    imesa->drawMap = imesa->readMap;
 }
 
+/* Move locking out to get reasonable span performance.
+ */
+void i810SpanRenderStart( GLcontext *ctx )
+{
+   i810ContextPtr imesa = I810_CONTEXT(ctx);
+   I810_FIREVERTICES(imesa);
+   LOCK_HARDWARE(imesa);
+   i810RegetLockQuiescent( imesa );
+}
+
+void i810SpanRenderFinish( GLcontext *ctx )
+{
+   i810ContextPtr imesa = I810_CONTEXT( ctx );
+   _swrast_flush( ctx );
+   UNLOCK_HARDWARE( imesa );
+}
 
 void i810InitSpanFuncs( GLcontext *ctx )
 {
@@ -167,4 +177,7 @@ void i810InitSpanFuncs( GLcontext *ctx )
    swdd->WriteDepthSpan = i810WriteDepthSpan_16;
    swdd->ReadDepthPixels = i810ReadDepthPixels_16;
    swdd->WriteDepthPixels = i810WriteDepthPixels_16;
+
+   swdd->SpanRenderStart = i810SpanRenderStart;
+   swdd->SpanRenderFinish = i810SpanRenderFinish; 
 }
index a7b809b..545bce4 100644 (file)
@@ -3,4 +3,7 @@
 
 extern void i810InitSpanFuncs( GLcontext *ctx );
 
+extern void i810SpanRenderFinish( GLcontext *ctx );
+extern void i810SpanRenderStart( GLcontext *ctx );
+
 #endif