u_upload_mgr: remove the 'flushed' parameter
authorMarek Olšák <maraeo@gmail.com>
Sun, 1 Jan 2012 17:23:07 +0000 (18:23 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 5 Jan 2012 17:29:11 +0000 (18:29 +0100)
Not used by anybody.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_upload_mgr.c
src/gallium/auxiliary/util/u_upload_mgr.h
src/gallium/auxiliary/util/u_vbuf.c
src/gallium/drivers/r300/r300_render_translate.c
src/gallium/drivers/r300/r300_screen_buffer.c
src/gallium/drivers/r600/r600_buffer.c
src/gallium/drivers/r600/r600_translate.c
src/gallium/drivers/svga/svga_draw_elements.c
src/gallium/drivers/svga/svga_pipe_draw.c

index 936e881d9c01f2643addcff7629261c3bd4b3383..b4b4c91f1ec632a42491e33ff092654d41d977c5 100644 (file)
@@ -158,7 +158,6 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
                                 unsigned size,
                                 unsigned *out_offset,
                                 struct pipe_resource **outbuf,
-                                boolean *flushed,
                                 void **ptr )
 {
    unsigned alloc_size = align( size, upload->alignment );
@@ -172,10 +171,6 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
                                                   alloc_offset + alloc_size);
       if (ret != PIPE_OK)
          return ret;
-
-      *flushed = TRUE;
-   } else {
-      *flushed = FALSE;
    }
 
    offset = MAX2(upload->offset, alloc_offset);
@@ -214,12 +209,11 @@ enum pipe_error u_upload_data( struct u_upload_mgr *upload,
                                unsigned size,
                                const void *data,
                                unsigned *out_offset,
-                               struct pipe_resource **outbuf,
-                               boolean *flushed )
+                               struct pipe_resource **outbuf)
 {
    uint8_t *ptr;
    enum pipe_error ret = u_upload_alloc(upload, min_out_offset, size,
-                                        out_offset, outbuf, flushed,
+                                        out_offset, outbuf,
                                         (void**)&ptr);
    if (ret != PIPE_OK)
       return ret;
@@ -240,8 +234,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
                                  unsigned size,
                                  struct pipe_resource *inbuf,
                                  unsigned *out_offset,
-                                 struct pipe_resource **outbuf,
-                                 boolean *flushed )
+                                 struct pipe_resource **outbuf)
 {
    enum pipe_error ret = PIPE_OK;
    struct pipe_transfer *transfer = NULL;
@@ -265,7 +258,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
                         size,
                         map,
                         out_offset,
-                        outbuf, flushed );
+                        outbuf);
 
    pipe_buffer_unmap( upload->pipe, transfer );
 
index 98915139801bd41391a8a217ca44c9044b2cf117..b50d3f32c93bdb0067dd8590298710ceb164dcec 100644 (file)
@@ -94,7 +94,6 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
                                 unsigned size,
                                 unsigned *out_offset,
                                 struct pipe_resource **outbuf,
-                                boolean *flushed,
                                 void **ptr );
 
 
@@ -109,8 +108,7 @@ enum pipe_error u_upload_data( struct u_upload_mgr *upload,
                                unsigned size,
                                const void *data,
                                unsigned *out_offset,
-                               struct pipe_resource **outbuf,
-                               boolean *flushed );
+                               struct pipe_resource **outbuf);
 
 
 /**
@@ -125,8 +123,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
                                  unsigned size,
                                  struct pipe_resource *inbuf,
                                  unsigned *out_offset,
-                                 struct pipe_resource **outbuf,
-                                 boolean *flushed );
+                                 struct pipe_resource **outbuf);
 
 
 
index 7c87bf8b210407a77541239d095b8a452717dd48..943336d84846ecdb59efd0786cffb60c70693b0c 100644 (file)
@@ -195,7 +195,6 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr,
    struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0};
    struct pipe_resource *out_buffer = NULL;
    unsigned i, out_offset, num_verts = max_index + 1 - min_index;
-   boolean upload_flushed = FALSE;
 
    memset(&key, 0, sizeof(key));
    memset(tr_elem_index, 0xff, sizeof(tr_elem_index));
@@ -263,7 +262,7 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr,
    u_upload_alloc(mgr->b.uploader,
                   key.output_stride * min_index,
                   key.output_stride * num_verts,
-                  &out_offset, &out_buffer, &upload_flushed,
+                  &out_offset, &out_buffer,
                   (void**)&out_map);
 
    out_offset -= key.output_stride * min_index;
@@ -600,7 +599,6 @@ u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
    /* Upload buffers. */
    for (i = 0; i < nr_vbufs; i++) {
       unsigned start, end = end_offset[i];
-      boolean flushed;
       struct pipe_vertex_buffer *real_vb;
       uint8_t *ptr;
 
@@ -615,7 +613,7 @@ u_vbuf_upload_buffers(struct u_vbuf_priv *mgr,
       ptr = u_vbuf_resource(mgr->b.vertex_buffer[i].buffer)->user_ptr;
 
       u_upload_data(mgr->b.uploader, start, end - start, ptr + start,
-                    &real_vb->buffer_offset, &real_vb->buffer, &flushed);
+                    &real_vb->buffer_offset, &real_vb->buffer);
 
       real_vb->buffer_offset -= start;
    }
index f8c7558f4b4ef8795b8c4f810ee305b0a2bb147b..c2eb3c547f4615fc70207ba2317b16929b5eabe4 100644 (file)
@@ -33,12 +33,11 @@ void r300_translate_index_buffer(struct r300_context *r300,
     struct pipe_resource *out_buffer = NULL;
     unsigned out_offset;
     void *ptr;
-    boolean flushed;
 
     switch (*index_size) {
     case 1:
         u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
-                       &out_offset, &out_buffer, &flushed, &ptr);
+                       &out_offset, &out_buffer, &ptr);
 
         util_shorten_ubyte_elts_to_userptr(
                 &r300->context, *index_buffer, index_offset,
@@ -53,7 +52,7 @@ void r300_translate_index_buffer(struct r300_context *r300,
     case 2:
         if (index_offset) {
             u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
-                           &out_offset, &out_buffer, &flushed, &ptr);
+                           &out_offset, &out_buffer, &ptr);
 
             util_rebuild_ushort_elts_to_userptr(&r300->context, *index_buffer,
                                                 index_offset, *start,
@@ -68,7 +67,7 @@ void r300_translate_index_buffer(struct r300_context *r300,
     case 4:
         if (index_offset) {
             u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 4,
-                           &out_offset, &out_buffer, &flushed, &ptr);
+                           &out_offset, &out_buffer, &ptr);
 
             util_rebuild_uint_elts_to_userptr(&r300->context, *index_buffer,
                                               index_offset, *start,
index 2e9e7d7f408e274fd25b5c5756a32bcf56f59f67..9d8ce62a6d2d3e835908e10faab80d87650a9d65 100644 (file)
@@ -38,7 +38,6 @@ void r300_upload_index_buffer(struct r300_context *r300,
                              unsigned count, uint8_t *ptr)
 {
     unsigned index_offset;
-    boolean flushed;
 
     *index_buffer = NULL;
 
@@ -46,7 +45,7 @@ void r300_upload_index_buffer(struct r300_context *r300,
                   0, count * index_size,
                   ptr + (*start * index_size),
                   &index_offset,
-                  index_buffer, &flushed);
+                  index_buffer);
 
     *start = index_offset / index_size;
 }
index a0386fe4b26e529174a15391c5f13f1d8ded74bd..b7f0b24ec8c647eefa08edc0c0408e7486864566 100644 (file)
@@ -241,10 +241,9 @@ void r600_upload_index_buffer(struct r600_pipe_context *rctx,
                              struct pipe_index_buffer *ib, unsigned count)
 {
        struct r600_resource *rbuffer = r600_resource(ib->buffer);
-       boolean flushed;
 
        u_upload_data(rctx->vbuf_mgr->uploader, 0, count * ib->index_size,
-                     rbuffer->b.user_ptr, &ib->offset, &ib->buffer, &flushed);
+                     rbuffer->b.user_ptr, &ib->offset, &ib->buffer);
 }
 
 void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resource **rbuffer,
@@ -253,7 +252,6 @@ void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resour
        if ((*rbuffer)->b.user_ptr) {
                uint8_t *ptr = (*rbuffer)->b.user_ptr;
                unsigned size = (*rbuffer)->b.b.b.width0;
-               boolean flushed;
 
                *rbuffer = NULL;
 
@@ -271,12 +269,12 @@ void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resour
                        }
 
                        u_upload_data(rctx->vbuf_mgr->uploader, 0, size, tmpPtr, const_offset,
-                                     (struct pipe_resource**)rbuffer, &flushed);
+                                     (struct pipe_resource**)rbuffer);
 
                        free(tmpPtr);
                } else {
                        u_upload_data(rctx->vbuf_mgr->uploader, 0, size, ptr, const_offset,
-                                     (struct pipe_resource**)rbuffer, &flushed);
+                                     (struct pipe_resource**)rbuffer);
                }
        } else {
                *const_offset = 0;
index 9159e452343e64b5560ce23aa7c388c3ff2a66a6..94497077cbab074edcb0ac0e955c6adc1fc6b9ff 100644 (file)
@@ -36,12 +36,11 @@ void r600_translate_index_buffer(struct r600_pipe_context *r600,
        struct pipe_resource *out_buffer = NULL;
        unsigned out_offset;
        void *ptr;
-       boolean flushed;
 
        switch (ib->index_size) {
        case 1:
                u_upload_alloc(r600->vbuf_mgr->uploader, 0, count * 2,
-                              &out_offset, &out_buffer, &flushed, &ptr);
+                              &out_offset, &out_buffer, &ptr);
 
                util_shorten_ubyte_elts_to_userptr(
                                &r600->context, ib->buffer, 0, ib->offset, count, ptr);
index ba492412b446dfc8af8d574b4d6adff8bac2ded2..1c20881a34d81f174bd520d5cd3337a0f9e221aa 100644 (file)
@@ -121,7 +121,6 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
    if (index_buffer && 
        svga_buffer_is_user_buffer(index_buffer)) 
    {
-      boolean flushed;
       assert( index_buffer->width0 >= index_offset + count * index_size );
 
       ret = u_upload_buffer( hwtnl->upload_ib,
@@ -130,8 +129,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
                              count * index_size,
                              index_buffer,
                              &index_offset,
-                             &upload_buffer,
-                             &flushed );
+                             &upload_buffer);
       if (ret != PIPE_OK)
          goto done;
 
index 141734b458c81ccff1a6fbe01eb43ebf5ba8b6b5..c61d5d000de7a2a1105885879f8ff2a831b809a4 100644 (file)
@@ -138,7 +138,6 @@ svga_upload_user_buffers(struct svga_context *svga,
 
       if (vb->buffer && svga_buffer_is_user_buffer(vb->buffer)) {
          struct svga_buffer *buffer = svga_buffer(vb->buffer);
-         boolean flushed;
 
          /*
           * Check if already uploaded. Otherwise go ahead and upload.
@@ -153,8 +152,7 @@ svga_upload_user_buffers(struct svga_context *svga,
                                 buffer->uploaded.end - buffer->uploaded.start,
                                 &buffer->b.b,
                                 &buffer->uploaded.offset,
-                                &buffer->uploaded.buffer,
-                                &flushed);
+                                &buffer->uploaded.buffer);
 
          if (ret)
             return ret;