diff options
author | Marek Olšák <[email protected]> | 2012-10-08 04:06:42 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-10-11 21:12:16 +0200 |
commit | 369e46888904c6d379b8b477d9242cff1608e30e (patch) | |
tree | 528b10f900f23af3acd22a0edcf50fde0eeee86e /src/gallium/drivers/svga/svga_swtnl_backend.c | |
parent | ec4c74a9dc10039d97ad24c4f16bd2400517991d (diff) |
gallium: unify transfer functions
"get_transfer + transfer_map" becomes "transfer_map".
"transfer_unmap + transfer_destroy" becomes "transfer_unmap".
transfer_map must create and return the transfer object and transfer_unmap
must destroy it.
transfer_map is successful if the returned buffer pointer is not NULL.
If transfer_map fails, the pointer to the transfer object remains unchanged
(i.e. doesn't have to be NULL).
Acked-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_swtnl_backend.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_swtnl_backend.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c index 33557aa937a..8900cdde18d 100644 --- a/src/gallium/drivers/svga/svga_swtnl_backend.c +++ b/src/gallium/drivers/svga/svga_swtnl_backend.c @@ -131,8 +131,10 @@ svga_vbuf_render_map_vertices( struct vbuf_render *render ) &svga_render->vbuf_transfer); if (ptr) return ptr + svga_render->vbuf_offset; - else + else { + svga_render->vbuf_transfer = NULL; return NULL; + } } else { /* we probably ran out of memory when allocating the vertex buffer */ |