diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-08-30 13:06:18 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2009-08-30 13:06:18 +0200 |
commit | 9053bb0d405db0b1a2a917317c7ec41e63b54f09 (patch) | |
tree | faaa373cf126c3d23169a436f72d24c89e8d6812 /src/gallium/auxiliary | |
parent | 3c1172f06636ff4aec24a6c68df937844da73a53 (diff) | |
parent | edb117879846155632aaeb66483a3085c7a78815 (diff) |
Merge branch 'mesa_7_5_branch'
Conflicts:
src/glx/x11/glxcmds.c
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_upload_mgr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index c90425f3e5..eb635c9f14 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/src/gallium/auxiliary/util/u_upload_mgr.c @@ -123,21 +123,25 @@ static enum pipe_error u_upload_alloc_buffer( struct u_upload_mgr *upload, unsigned min_size ) { + unsigned size; + /* Release old buffer, if present: */ u_upload_flush( upload ); /* Allocate a new one: */ - upload->size = align(MAX2(upload->default_size, min_size), 4096); + size = align(MAX2(upload->default_size, min_size), 4096); upload->buffer = pipe_buffer_create( upload->screen, upload->alignment, upload->usage | PIPE_BUFFER_USAGE_CPU_WRITE, - upload->size ); + size ); if (upload->buffer == NULL) goto fail; + upload->size = size; + upload->offset = 0; return 0; |