diff options
author | marha <marha@users.sourceforge.net> | 2012-01-06 19:47:46 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2012-01-06 19:47:46 +0100 |
commit | 2d52fd67e716caae85bce150b01bc5c284b12de7 (patch) | |
tree | 2a641392a6affe99603cbaf169c1ab5173879d27 /mesalib/src/gallium/auxiliary/util/u_upload_mgr.c | |
parent | d515b895dc5151d102f33b577cafbf63473bbafa (diff) | |
parent | 7e9f4ea970e8f7008c212d7d3918a974eb0066da (diff) | |
download | vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.tar.gz vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.tar.bz2 vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/link_uniforms.cpp
mesalib/src/mesa/drivers/dri/common/drisw_util.c
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_upload_mgr.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_upload_mgr.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c b/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c index a2319d0c4..b4b4c91f1 100644 --- a/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c @@ -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); @@ -192,6 +187,8 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload, *ptr = NULL; return PIPE_ERROR_OUT_OF_MEMORY; } + + upload->map -= offset; } assert(offset < upload->buffer->width0); @@ -212,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; @@ -238,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; @@ -261,9 +256,9 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload, ret = u_upload_data( upload, min_out_offset, size, - map + offset, + map, out_offset, - outbuf, flushed ); + outbuf); pipe_buffer_unmap( upload->pipe, transfer ); |