On the way to getting stencil working.
[mesa.git] / src / mesa / drivers / dri / sis / sis_span.c
index 1342d53922323f8813cfdf783dfd2a3677ddd7e3..47790a5f8527bf43e599255945af2ec352b5fee2 100644 (file)
@@ -34,6 +34,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "sis_context.h"
 #include "sis_span.h"
+#include "sis_lock.h"
+#include "sis_tris.h"
 
 #include "swrast/swrast.h"
 
@@ -216,16 +218,21 @@ static void sisDDSetBuffer( GLcontext *ctx,
    }
 }
 
-static void sisSpanRenderStart( GLcontext *ctx )
+void sisSpanRenderStart( GLcontext *ctx )
 {
    sisContextPtr smesa = SIS_CONTEXT(ctx);
 
+   SIS_FIREVERTICES(smesa);
+   LOCK_HARDWARE();
    WaitEngIdle( smesa );
 }
 
-static void sisSpanRenderFinish( GLcontext *ctx )
+void sisSpanRenderFinish( GLcontext *ctx )
 {
+   sisContextPtr smesa = SIS_CONTEXT(ctx);
+
    _swrast_flush( ctx );
+   UNLOCK_HARDWARE();
 }
 
 void
@@ -294,7 +301,7 @@ sisDDInitSpanFuncs( GLcontext *ctx )
       swdd->ReadRGBAPixels = sisReadRGBAPixels_8888;
       break;
     default:
-      assert(0);
+      sis_fatal_error("Bad bytesPerPixel.\n");
       break;
    }