aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-06 19:27:25 +0100
committerMarc Haesen <marc@hc-consult.be>2012-01-06 19:27:25 +0100
commit7e9f4ea970e8f7008c212d7d3918a974eb0066da (patch)
tree92cf7fcdf6e8093e743346af2397f3caa17cffe3 /mesalib/src/gallium/auxiliary/util/u_upload_mgr.c
parent9715b7fab0757c86e1bb151f3dce0b324bcff692 (diff)
downloadvcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.gz
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.bz2
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.zip
libX11 mesa pixman git update 6 jan 2012
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_upload_mgr.c')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_upload_mgr.c19
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 );