diff options
author | Tilman Sauerbeck <[email protected]> | 2010-09-26 19:26:24 +0200 |
---|---|---|
committer | Tilman Sauerbeck <[email protected]> | 2010-09-28 22:12:23 +0200 |
commit | 35f94b1942d9b99463ef9e179ebf70809e3bea69 (patch) | |
tree | 4d0166c19d8f57ec1ca56b21a30c29ef65b77da1 /src/gallium/drivers/r600/r600_buffer.c | |
parent | 89f6783d1769c61b835b49a5fb4405a3249031f4 (diff) |
r600g: Cleaned up index buffer reference handling in the draw module.
This fixes a buffer leak.
Signed-off-by: Tilman Sauerbeck <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_buffer.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_buffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 1621b2ab63f..d734e2349fb 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -280,7 +280,10 @@ int r600_upload_index_buffer(struct r600_context *rctx, goto done; } draw->index_buffer_offset = index_offset; - draw->index_buffer = upload_buffer; + + /* Transfer ownership. */ + pipe_resource_reference(&draw->index_buffer, upload_buffer); + pipe_resource_reference(&upload_buffer, NULL); } done: |