gallium: remove deprecated PIPE_TRANSFER_DISCARD
authorMarek Olšák <maraeo@gmail.com>
Sun, 1 Jan 2012 23:02:34 +0000 (00:02 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 5 Jan 2012 17:29:11 +0000 (18:29 +0100)
PIPE_TRANSFER_DISCARD_RANGE is defined the same.

src/gallium/auxiliary/vl/vl_compositor.c
src/gallium/auxiliary/vl/vl_idct.c
src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
src/gallium/auxiliary/vl/vl_vertex_buffers.c
src/gallium/auxiliary/vl/vl_zscan.c
src/gallium/drivers/nouveau/nouveau_winsys.h
src/gallium/drivers/r300/r300_screen_buffer.c
src/gallium/drivers/r600/r600_buffer.c
src/gallium/drivers/svga/svga_resource_buffer_upload.c
src/gallium/drivers/svga/svga_swtnl_backend.c
src/gallium/include/pipe/p_defines.h

index f20941b44007c61164b2fdeca6e8d4da12e285ed..3631145b3b5c4decaf5d76774c9b8580966830e1 100644 (file)
@@ -502,14 +502,14 @@ gen_vertex_data(struct vl_compositor *c, struct u_rect *dirty)
    assert(c);
 
    vb = pipe_buffer_map(c->pipe, c->vertex_buf.buffer,
-                        PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD | PIPE_TRANSFER_DONTBLOCK,
+                        PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE | PIPE_TRANSFER_DONTBLOCK,
                         &buf_transfer);
 
    if (!vb) {
       // If buffer is still locked from last draw create a new one
       create_vertex_buffer(c);
       vb = pipe_buffer_map(c->pipe, c->vertex_buf.buffer,
-                           PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+                           PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
                            &buf_transfer);
    }
 
@@ -635,7 +635,7 @@ vl_compositor_set_csc_matrix(struct vl_compositor *c, const float matrix[16])
    memcpy
    (
       pipe_buffer_map(c->pipe, c->csc_matrix,
-                      PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+                      PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
                       &buf_transfer),
       matrix,
       sizeof(csc_matrix)
index 325551aad0d49b4571c4f0fcfb87f8961cb2588f..1486c00e7f0208b3c3e47d0aa7127a51efd4c42a 100644 (file)
@@ -715,7 +715,7 @@ vl_idct_upload_matrix(struct pipe_context *pipe, float scale)
    buf_transfer = pipe->get_transfer
    (
       pipe, matrix,
-      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
       &rect
    );
    if (!buf_transfer)
index 1426eb86fe2b8d6a7835e13237dae1a78bb2e861..1a3a2a4bb22fde51b9ceb9b316f48f7941d8edd2 100644 (file)
@@ -598,7 +598,7 @@ vl_mpeg12_begin_frame(struct pipe_video_decoder *decoder)
    buf->tex_transfer = dec->base.context->get_transfer
    (
       dec->base.context, tex,
-      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
       &rect
    );
 
index e2665a5cfdede84af1faa7019c6fb895651c508e..96765fc3433ed8a0babcd32972dde4e0bc7a4420 100644 (file)
@@ -65,7 +65,7 @@ vl_vb_upload_quads(struct pipe_context *pipe)
    (
       pipe,
       quad.buffer,
-      PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+      PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
       &buf_transfer
    );
 
@@ -109,7 +109,7 @@ vl_vb_upload_pos(struct pipe_context *pipe, unsigned width, unsigned height)
    (
       pipe,
       pos.buffer,
-      PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+      PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
       &buf_transfer
    );
 
@@ -298,7 +298,7 @@ vl_vb_map(struct vl_vertex_buffer *buffer, struct pipe_context *pipe)
       (
          pipe,
          buffer->ycbcr[i].resource,
-         PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+         PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
          &buffer->ycbcr[i].transfer
       );
    }
@@ -308,7 +308,7 @@ vl_vb_map(struct vl_vertex_buffer *buffer, struct pipe_context *pipe)
       (
          pipe,
          buffer->mv[i].resource,
-         PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+         PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
          &buffer->mv[i].transfer
       );
    }
index 600e4152412119dab0f4822d656402b1e9ac044a..730074c0c57bf46b04293566a5911e0e463ef476 100644 (file)
@@ -382,7 +382,7 @@ vl_zscan_layout(struct pipe_context *pipe, const int layout[64], unsigned blocks
    buf_transfer = pipe->get_transfer
    (
       pipe, res,
-      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
       &rect
    );
    if (!buf_transfer)
@@ -561,7 +561,7 @@ vl_zscan_upload_quant(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer,
    buf_transfer = pipe->get_transfer
    (
       pipe, buffer->quant->texture,
-      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
+      0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
       &rect
    );
    if (!buf_transfer)
index 1abfa790072de8dc464f1737373bf57a12f76049..3423451748a6cd4e41305c8fc394cb0f4023b0c9 100644 (file)
@@ -31,7 +31,7 @@ nouveau_screen_transfer_flags(unsigned pipe)
                flags |= NOUVEAU_BO_RD;
        if (pipe & PIPE_TRANSFER_WRITE)
                flags |= NOUVEAU_BO_WR;
-       if (pipe & PIPE_TRANSFER_DISCARD)
+       if (pipe & PIPE_TRANSFER_DISCARD_RANGE)
                flags |= NOUVEAU_BO_INVAL;
        if (pipe & PIPE_TRANSFER_UNSYNCHRONIZED)
                flags |= NOUVEAU_BO_NOSYNC;
index 9d8ce62a6d2d3e835908e10faab80d87650a9d65..37f6e8d53d8873b99b11e20596ebc0a13c6540e6 100644 (file)
@@ -161,7 +161,7 @@ static void r300_buffer_transfer_inline_write(struct pipe_context *pipe,
     assert(rbuf->b.user_ptr == NULL);
 
     map = rws->buffer_map(rbuf->buf, r300->cs,
-                          PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD | usage);
+                          PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE | usage);
 
     memcpy(map + box->x, data, box->width);
 
index b7f0b24ec8c647eefa08edc0c0408e7486864566..4511a94bce5dd194ea183b50f81a954984b015e3 100644 (file)
@@ -127,7 +127,7 @@ static void r600_buffer_transfer_inline_write(struct pipe_context *pipe,
        assert(rbuffer->b.user_ptr == NULL);
 
        map = rctx->ws->buffer_map(rbuffer->buf, rctx->ctx.cs,
-                                  PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD | usage);
+                                  PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE | usage);
 
        memcpy(map + box->x, data, box->width);
 
index 36782d5d0d195d1ab280ce1818f93bc589ef6b02..f4a96cba34949f775d2f4da388e2f08809ff5e51 100644 (file)
@@ -500,7 +500,7 @@ svga_buffer_upload_piecewise(struct svga_screen *ss,
 
          map = sws->buffer_map(sws, hwbuf,
                                PIPE_TRANSFER_WRITE |
-                               PIPE_TRANSFER_DISCARD);
+                               PIPE_TRANSFER_DISCARD_RANGE);
          assert(map);
          if (map) {
             memcpy(map, sbuf->swbuf, size);
index e149d21a47eea7433cc99cdf0a434b9b23cfdca7..521226c0db7d0a2caa86e443845815311945c66a 100644 (file)
@@ -126,7 +126,7 @@ svga_vbuf_render_map_vertices( struct vbuf_render *render )
                                          svga_render->vbuf,
                                          PIPE_TRANSFER_WRITE |
                                          PIPE_TRANSFER_FLUSH_EXPLICIT |
-                                         PIPE_TRANSFER_DISCARD |
+                                         PIPE_TRANSFER_DISCARD_RANGE |
                                          PIPE_TRANSFER_UNSYNCHRONIZED,
                                          &svga_render->vbuf_transfer);
       if (ptr)
index 05aa1cd31e0a72d6b0ce69c927bd2f4a096f8d38..3b3940db89373ba1a535f8af8d6076e1b9444227 100644 (file)
@@ -233,7 +233,6 @@ enum pipe_transfer_usage {
     * See also:
     * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag.
     */
-   PIPE_TRANSFER_DISCARD = (1 << 8), /* DEPRECATED */
    PIPE_TRANSFER_DISCARD_RANGE = (1 << 8),
 
    /**