radeon: fix readback problem for piglit tests
authorDave Airlie <airlied@redhat.com>
Mon, 30 Mar 2009 02:02:08 +0000 (12:02 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 30 Mar 2009 02:28:55 +0000 (12:28 +1000)
src/mesa/drivers/dri/radeon/radeon_span.c

index 0b4eaae02bffefefa9344ea37b9781f859d5084a..961bbaba5b2e697511b6328554dc9efb31f3609b 100644 (file)
@@ -441,13 +441,6 @@ static void radeonSpanRenderStart(GLcontext * ctx)
 
        radeon_firevertices(rmesa);
 
-       for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
-               if (ctx->Texture.Unit[i]._ReallyEnabled)
-                       ctx->Driver.MapTexture(ctx, ctx->Texture.Unit[i]._Current);
-       }
-
-       radeon_map_unmap_buffers(ctx, 1);
-
        /* The locking and wait for idle should really only be needed in classic mode.
         * In a future memory manager based implementation, this should become
         * unnecessary due to the fact that mapping our buffers, textures, etc.
@@ -455,6 +448,16 @@ static void radeonSpanRenderStart(GLcontext * ctx)
         * be waited on. */
        LOCK_HARDWARE(rmesa);
        radeonWaitForIdleLocked(rmesa);
+
+       for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
+               if (ctx->Texture.Unit[i]._ReallyEnabled)
+                       ctx->Driver.MapTexture(ctx, ctx->Texture.Unit[i]._Current);
+       }
+
+       radeon_map_unmap_buffers(ctx, 1);
+
+
+
 }
 
 static void radeonSpanRenderFinish(GLcontext * ctx)