aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-15 16:50:35 +0200
committermarha <marha@users.sourceforge.net>2012-10-15 16:50:35 +0200
commit54db46582aba2252d544fa3956522f9ef06b49cb (patch)
treee3692fa2c3864c2bd13089d80bbaccb86b5d4825 /mesalib/src/gallium/auxiliary/util/u_upload_mgr.c
parent8223fb176264123c86c0d3eb845973d00fd62cc2 (diff)
downloadvcxsrv-54db46582aba2252d544fa3956522f9ef06b49cb.tar.gz
vcxsrv-54db46582aba2252d544fa3956522f9ef06b49cb.tar.bz2
vcxsrv-54db46582aba2252d544fa3956522f9ef06b49cb.zip
xserver mesa pixman git update 15 oct 2012
xserver: a69429a17bf4630f6e26f61630a1c2b287202627 pixman: d5f2f39319fc358cccda60abe0bc927bd27131c1 mesa: 4004620d34a580c8fdb965d9b640e97453fc8b28
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_upload_mgr.c')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_upload_mgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c b/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c
index b4b4c91f1..b62973de6 100644
--- a/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/mesalib/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -82,7 +82,6 @@ void u_upload_unmap( struct u_upload_mgr *upload )
box->x, upload->offset - box->x);
}
pipe_transfer_unmap(upload->pipe, upload->transfer);
- pipe_transfer_destroy(upload->pipe, upload->transfer);
upload->transfer = NULL;
upload->map = NULL;
}
@@ -142,13 +141,13 @@ u_upload_alloc_buffer( struct u_upload_mgr *upload,
PIPE_TRANSFER_FLUSH_EXPLICIT,
&upload->transfer);
if (upload->map == NULL) {
+ upload->transfer = NULL;
upload->size = 0;
pipe_resource_reference(&upload->buffer, NULL);
return PIPE_ERROR_OUT_OF_MEMORY;
}
upload->size = size;
-
upload->offset = 0;
return PIPE_OK;
}
@@ -185,6 +184,7 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
if (!upload->map) {
pipe_resource_reference(outbuf, NULL);
*ptr = NULL;
+ upload->transfer = NULL;
return PIPE_ERROR_OUT_OF_MEMORY;
}