st/vega: remove unnecessary flushes
authorMarek Olšák <maraeo@gmail.com>
Mon, 7 Mar 2011 23:31:06 +0000 (00:31 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 11 Mar 2011 01:02:16 +0000 (02:02 +0100)
I don't see a reason we need them.

src/gallium/state_trackers/vega/api_images.c
src/gallium/state_trackers/vega/image.c
src/gallium/state_trackers/vega/mask.c

index b993ba62c26802016420b1fb55c7bfdc9030ee97..a4545a72b5de8f6537001d4023d2a81be4fa861d 100644 (file)
@@ -387,8 +387,6 @@ void vegaWritePixels(const void * data, VGint dataStride,
 #endif
       image_destroy(img);
    }
-   /* make sure rendering has completed */
-   pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
 }
 
 void vegaReadPixels(void * data, VGint dataStride,
@@ -421,8 +419,6 @@ void vegaReadPixels(void * data, VGint dataStride,
       return;
    }
 
-   /* make sure rendering has completed */
-   pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
    if (sx < 0) {
       xoffset = -sx;
       xoffset *= _vega_size_for_format(dataFormat);
index 73351b671f996fcbb176336f36a4023be3ba8934..2c6dcb146b8c59605506497e912c5fafac3a73c0 100644 (file)
@@ -518,8 +518,6 @@ void image_copy(struct vg_image *dst, VGint dx, VGint dy,
       vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
       return;
    }
-   /* make sure rendering has completed */
-   ctx->pipe->flush(ctx->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
    vg_copy_texture(ctx, dst->sampler_view->texture, dst->x + dx, dst->y + dy,
                    src->sampler_view, src->x + sx, src->y + sy, width, height);
 }
@@ -569,9 +567,6 @@ void image_set_pixels(VGint dx, VGint dy,
    struct pipe_surface *surf, surf_tmpl;
    struct st_renderbuffer *strb = ctx->draw_buffer->strb;
 
-   /* make sure rendering has completed */
-   pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
-
    memset(&surf_tmpl, 0, sizeof(surf_tmpl));
    u_surface_default_template(&surf_tmpl, image_texture(src),
                               0 /* no bind flag - not a surface*/);
@@ -595,9 +590,6 @@ void image_get_pixels(struct vg_image *dst, VGint dx, VGint dy,
    /* flip the y coordinates */
    /*dy = dst->height - dy - height;*/
 
-   /* make sure rendering has completed */
-   pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
-
    memset(&surf_tmpl, 0, sizeof(surf_tmpl));
    u_surface_default_template(&surf_tmpl, image_texture(dst),
                               PIPE_BIND_RENDER_TARGET);
index dfd0600e444c2c5d7fdb2eb34f76c86ad777397e..10590e29cd2018ed355eb39b5f89f012c954d63c 100644 (file)
@@ -111,8 +111,6 @@ static void read_alpha_mask(void * data, VGint dataStride,
    VGubyte *dst = (VGubyte *)data;
    VGint xoffset = 0, yoffset = 0;
 
-   /* make sure rendering has completed */
-   pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
    if (sx < 0) {
       xoffset = -sx;
       xoffset *= _vega_size_for_format(dataFormat);