diff options
author | Michal Krol <michal@tungstengraphics.com> | 2008-01-23 15:47:10 +0100 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-01-26 11:05:24 +0900 |
commit | 0fe428f1dfafe6bfb8896e0a08cbe12d569497d7 (patch) | |
tree | b2584e01dcbc963b938581fd483c8bdd085b2255 | |
parent | b8dc2956df0f534924fc45287cccc04499e70959 (diff) |
d3d: Fix build on Windows.
-rw-r--r-- | src/mesa/pipe/pipebuffer/pb_buffer_fenced.c | 5 | ||||
-rw-r--r-- | src/mesa/pipe/pipebuffer/pb_bufmgr_fenced.c | 8 | ||||
-rw-r--r-- | src/mesa/pipe/pipebuffer/pb_bufmgr_pool.c | 13 |
3 files changed, 15 insertions, 11 deletions
diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c b/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c index ad2da71c4a..5b33a42e19 100644 --- a/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c +++ b/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c @@ -42,6 +42,7 @@ #include "p_compiler.h" #include "p_winsys.h" #include "p_thread.h" +#include "p_util.h" #include "pb_buffer.h" #include "pb_buffer_fenced.h" @@ -248,7 +249,7 @@ fenced_buffer_list_create(struct pipe_winsys *winsys) { struct fenced_buffer_list *fenced_list; - fenced_list = (struct fenced_buffer_list *)calloc(1, sizeof(*fenced_list)); + fenced_list = (struct fenced_buffer_list *)CALLOC(1, sizeof(*fenced_list)); if (!fenced_list) return NULL; @@ -292,7 +293,7 @@ fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list) _glthread_UNLOCK_MUTEX(fenced_list->mutex); - free(fenced_list); + FREE(fenced_list); } diff --git a/src/mesa/pipe/pipebuffer/pb_bufmgr_fenced.c b/src/mesa/pipe/pipebuffer/pb_bufmgr_fenced.c index 28996b9a17..734d5bdceb 100644 --- a/src/mesa/pipe/pipebuffer/pb_bufmgr_fenced.c +++ b/src/mesa/pipe/pipebuffer/pb_bufmgr_fenced.c @@ -37,6 +37,8 @@ #include <assert.h> #include <stdlib.h> +#include "p_util.h" + #include "pb_buffer.h" #include "pb_buffer_fenced.h" #include "pb_bufmgr.h" @@ -100,7 +102,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr) fenced_mgr->provider->destroy(fenced_mgr->provider); - free(fenced_mgr); + FREE(fenced_mgr); } @@ -110,7 +112,7 @@ fenced_bufmgr_create(struct pb_manager *provider, { struct fenced_pb_manager *fenced_mgr; - fenced_mgr = (struct fenced_pb_manager *)calloc(1, sizeof(*fenced_mgr)); + fenced_mgr = (struct fenced_pb_manager *)CALLOC(1, sizeof(*fenced_mgr)); if (!fenced_mgr) return NULL; @@ -120,7 +122,7 @@ fenced_bufmgr_create(struct pb_manager *provider, fenced_mgr->provider = provider; fenced_mgr->fenced_list = fenced_buffer_list_create(winsys); if(!fenced_mgr->fenced_list) { - free(fenced_mgr); + FREE(fenced_mgr); return NULL; } diff --git a/src/mesa/pipe/pipebuffer/pb_bufmgr_pool.c b/src/mesa/pipe/pipebuffer/pb_bufmgr_pool.c index 1e213074f1..9d7dbd5eb9 100644 --- a/src/mesa/pipe/pipebuffer/pb_bufmgr_pool.c +++ b/src/mesa/pipe/pipebuffer/pb_bufmgr_pool.c @@ -43,6 +43,7 @@ #include "p_compiler.h" #include "p_thread.h" #include "p_defines.h" +#include "p_util.h" #include "pb_buffer.h" #include "pb_bufmgr.h" @@ -203,14 +204,14 @@ pool_bufmgr_destroy(struct pb_manager *mgr) struct pool_pb_manager *pool = pool_pb_manager(mgr); _glthread_LOCK_MUTEX(pool->mutex); - free(pool->bufs); + FREE(pool->bufs); pb_unmap(pool->buffer); pb_destroy(pool->buffer); _glthread_UNLOCK_MUTEX(pool->mutex); - free(mgr); + FREE(mgr); } @@ -223,7 +224,7 @@ pool_bufmgr_create(struct pb_manager *provider, struct pool_buffer *pool_buf; size_t i; - pool = (struct pool_pb_manager *)calloc(1, sizeof(*pool)); + pool = (struct pool_pb_manager *)CALLOC(1, sizeof(*pool)); if (!pool) return NULL; @@ -248,7 +249,7 @@ pool_bufmgr_create(struct pb_manager *provider, if(!pool->map) goto failure; - pool->bufs = (struct pool_buffer *) malloc(numBufs * sizeof(*pool->bufs)); + pool->bufs = (struct pool_buffer *) MALLOC(numBufs * sizeof(*pool->bufs)); if (!pool->bufs) goto failure; @@ -265,12 +266,12 @@ pool_bufmgr_create(struct pb_manager *provider, failure: if(pool->bufs) - free(pool->bufs); + FREE(pool->bufs); if(pool->map) pb_unmap(pool->buffer); if(pool->buffer) pb_destroy(pool->buffer); if(pool) - free(pool); + FREE(pool); return NULL; } |