r300g: fix DRM errors
authorMarek Olšák <maraeo@gmail.com>
Tue, 23 Feb 2010 00:14:44 +0000 (01:14 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sun, 7 Mar 2010 15:24:17 +0000 (16:24 +0100)
src/gallium/drivers/r300/r300_transfer.c

index 56a6976e8b61a8293a10522e6c5c3459742dd6a0..ec89681a3c00a013d58afc63120148e8731db99f 100644 (file)
@@ -102,10 +102,15 @@ static void r300_copy_into_tiled_texture(struct pipe_context *ctx,
                                   PIPE_BUFFER_USAGE_GPU_WRITE |
                                   PIPE_BUFFER_USAGE_PIXEL);
 
+    /* XXX this flush prevents the following DRM error from occuring:
+     * [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation !
+     * Reproducible with perf/copytex. */
+    ctx->flush(ctx, 0, NULL);
+
     ctx->surface_copy(ctx, dst, r300transfer->x, r300transfer->y, src, 0, 0,
                       transfer->width, transfer->height);
 
-    /* XXX this flush fixes lots of regressions, not sure why */
+    /* XXX this flush fixes a few piglit tests (e.g. glean/pixelFormats). */
     ctx->flush(ctx, 0, NULL);
 
     pipe_surface_reference(&src, NULL);