r600g: force flush on map as temporary fix to readpixel
authorJerome Glisse <jglisse@redhat.com>
Wed, 4 Aug 2010 20:28:33 +0000 (16:28 -0400)
committerJerome Glisse <jglisse@redhat.com>
Wed, 4 Aug 2010 20:29:56 +0000 (16:29 -0400)
Should allow more piglit test to pass. Need to plugin
proper flushing.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/r600_texture.c

index 3725bf856095ee41ad244dc659b85f1daa95257c..033c71f6ef1289b570b4e3a554108c001f8c1fc8 100644 (file)
@@ -234,6 +234,8 @@ void* r600_texture_transfer_map(struct pipe_context *ctx,
        struct r600_screen *rscreen = r600_screen(ctx->screen);
        char *map;
 
+       r600_flush(ctx, 0, NULL);
+
        resource = (struct r600_resource *)transfer->resource;
        if (radeon_bo_map(rscreen->rw, resource->bo)) {
                return NULL;