From: Brian Paul Date: Sat, 1 Sep 2012 13:47:24 +0000 (-0600) Subject: mesa: s/FREE/free/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe72a069d1fcce943f315907b4744b63158938b1;p=mesa.git mesa: s/FREE/free/ v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke --- diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c index 040382698b1..b91303d3e7b 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.c +++ b/src/gallium/state_trackers/dri/common/dri_context.c @@ -159,7 +159,7 @@ dri_create_context(gl_api api, const struct gl_config * visual, if (ctx && ctx->st) ctx->st->destroy(ctx->st); - FREE(ctx); + free(ctx); return GL_FALSE; } @@ -172,7 +172,7 @@ dri_destroy_context(__DRIcontext * cPriv) * driParseConfigFiles allocated values only - the rest * is owned by screen optionCache. */ - FREE(ctx->optionCache.values); + free(ctx->optionCache.values); /* No particular reason to wait for command completion before * destroying a context, but we flush the context here @@ -184,7 +184,7 @@ dri_destroy_context(__DRIcontext * cPriv) if (ctx->pp) pp_free(ctx->pp); - FREE(ctx); + free(ctx); } GLboolean diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 102a1326133..b76cb9a9ee1 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -355,13 +355,13 @@ dri_destroy_option_cache(struct dri_screen * screen) if (screen->optionCache.info) { for (i = 0; i < (1 << screen->optionCache.tableSize); ++i) { - FREE(screen->optionCache.info[i].name); - FREE(screen->optionCache.info[i].ranges); + free(screen->optionCache.info[i].name); + free(screen->optionCache.info[i].ranges); } - FREE(screen->optionCache.info); + free(screen->optionCache.info); } - FREE(screen->optionCache.values); + free(screen->optionCache.values); } void @@ -383,7 +383,7 @@ dri_destroy_screen(__DRIscreen * sPriv) dri_destroy_screen_helper(screen); - FREE(screen); + free(screen); sPriv->driverPrivate = NULL; sPriv->extensions = NULL; } diff --git a/src/gallium/state_trackers/glx/xlib/glx_usefont.c b/src/gallium/state_trackers/glx/xlib/glx_usefont.c index 5dac7a7dccd..f27c35c73c4 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_usefont.c +++ b/src/gallium/state_trackers/glx/xlib/glx_usefont.c @@ -357,7 +357,7 @@ glXUseXFont(Font font, int first, int count, int listbase) glEndList(); } - FREE(bm); + free(bm); XFreeFontInfo(NULL, fs, 1); XFreeGC(dpy, gc); diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index ef275b2e41c..37613304bb8 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -169,7 +169,7 @@ xmesa_init_display( Display *display ) xmdpy->screen = NULL; } if (xmdpy->smapi) { - FREE(xmdpy->smapi); + free(xmdpy->smapi); xmdpy->smapi = NULL; } @@ -800,8 +800,8 @@ XMesaVisual XMesaCreateVisual( Display *display, v->stvis.color_format = choose_pixel_format(v); if (v->stvis.color_format == PIPE_FORMAT_NONE) { - FREE(v->visinfo); - FREE(v); + free(v->visinfo); + free(v); return NULL; } diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c index f6439dc831b..ee425ec2b59 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.c +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c @@ -279,9 +279,9 @@ xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b) xstfb = CALLOC_STRUCT(xmesa_st_framebuffer); if (!stfbi || !xstfb) { if (stfbi) - FREE(stfbi); + free(stfbi); if (xstfb) - FREE(xstfb); + free(xstfb); return NULL; } @@ -314,8 +314,8 @@ xmesa_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi) for (i = 0; i < ST_ATTACHMENT_COUNT; i++) pipe_resource_reference(&xstfb->textures[i], NULL); - FREE(xstfb); - FREE(stfbi); + free(xstfb); + free(stfbi); } void diff --git a/src/mesa/drivers/dri/common/drisw_util.c b/src/mesa/drivers/dri/common/drisw_util.c index 0ec124ae537..d6927485425 100644 --- a/src/mesa/drivers/dri/common/drisw_util.c +++ b/src/mesa/drivers/dri/common/drisw_util.c @@ -68,7 +68,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions, *driver_configs = driDriverAPI.InitScreen(psp); if (*driver_configs == NULL) { - FREE(psp); + free(psp); return NULL; } @@ -79,7 +79,7 @@ static void driDestroyScreen(__DRIscreen *psp) { if (psp) { driDriverAPI.DestroyScreen(psp); - FREE(psp); + free(psp); } } @@ -178,7 +178,7 @@ driCreateContextAttribs(__DRIscreen *screen, int api, if (!driDriverAPI.CreateContext(mesa_api, modes, pcp, major_version, minor_version, flags, error, shareCtx)) { - FREE(pcp); + free(pcp); return NULL; } @@ -209,7 +209,7 @@ driDestroyContext(__DRIcontext *pcp) { if (pcp) { driDriverAPI.DestroyContext(pcp); - FREE(pcp); + free(pcp); } } @@ -289,7 +289,7 @@ static void dri_put_drawable(__DRIdrawable *pdp) return; driDriverAPI.DestroyBuffer(pdp); - FREE(pdp); + free(pdp); } } @@ -311,7 +311,7 @@ driCreateNewDrawable(__DRIscreen *psp, dri_get_drawable(pdp); if (!driDriverAPI.CreateBuffer(psp, pdp, &config->modes, GL_FALSE)) { - FREE(pdp); + free(pdp); return NULL; } diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c index e48ceb4a93b..92974840050 100644 --- a/src/mesa/drivers/dri/common/xmlconfig.c +++ b/src/mesa/drivers/dri/common/xmlconfig.c @@ -382,9 +382,9 @@ static GLboolean parseRanges (driOptionInfo *info, const XML_Char *string) { else range = NULL; } - FREE (cp); + free(cp); if (i < nRanges) { - FREE (ranges); + free(ranges); return GL_FALSE; } else assert (range == NULL); @@ -990,7 +990,7 @@ void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info, } if (filenames[1]) - FREE (filenames[1]); + free(filenames[1]); } void driDestroyOptionInfo (driOptionCache *info) { @@ -999,18 +999,18 @@ void driDestroyOptionInfo (driOptionCache *info) { GLuint i, size = 1 << info->tableSize; for (i = 0; i < size; ++i) { if (info->info[i].name) { - FREE (info->info[i].name); + free(info->info[i].name); if (info->info[i].ranges) - FREE (info->info[i].ranges); + free(info->info[i].ranges); } } - FREE (info->info); + free(info->info); } } void driDestroyOptionCache (driOptionCache *cache) { if (cache->values) - FREE (cache->values); + free(cache->values); } GLboolean driCheckOption (const driOptionCache *cache, const char *name, diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c index 663909ea4b6..3da07455776 100644 --- a/src/mesa/drivers/dri/i915/i830_context.c +++ b/src/mesa/drivers/dri/i915/i830_context.c @@ -65,7 +65,7 @@ i830CreateContext(const struct gl_config * mesaVis, if (!intelInitContext(intel, __DRI_API_OPENGL, mesaVis, driContextPriv, sharedContextPrivate, &functions)) { - FREE(i830); + free(i830); return false; } diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 1a0baa2965c..8ae1e580ed6 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -167,7 +167,7 @@ i915CreateContext(int api, if (!intelInitContext(intel, api, mesaVis, driContextPriv, sharedContextPrivate, &functions)) { - FREE(i915); + free(i915); *error = __DRI_CTX_ERROR_NO_MEMORY; return false; } @@ -184,7 +184,7 @@ i915CreateContext(int api, if (req_version > max_version) { *error = __DRI_CTX_ERROR_BAD_VERSION; - FREE(i915); + free(i915); return false; } break; @@ -194,7 +194,7 @@ i915CreateContext(int api, break; default: *error = __DRI_CTX_ERROR_BAD_API; - FREE(i915); + free(i915); return false; } diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 4e5aed69302..1083e28ce3b 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -148,7 +148,7 @@ brwCreateContext(int api, if (!intelInitContext( intel, api, mesaVis, driContextPriv, sharedContextPrivate, &functions )) { printf("%s: failed to init intel context\n", __FUNCTION__); - FREE(brw); + free(brw); *error = __DRI_CTX_ERROR_NO_MEMORY; return false; } diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index 8823b22357d..c39d589a1e9 100644 --- a/src/mesa/drivers/dri/i965/brw_state_cache.c +++ b/src/mesa/drivers/dri/i965/brw_state_cache.c @@ -120,7 +120,7 @@ rehash(struct brw_cache *cache) items[c->hash % size] = c; } - FREE(cache->items); + free(cache->items); cache->items = items; cache->size = size; } diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 6c53b4762e7..3470db642c6 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -309,7 +309,7 @@ intel_create_image_from_name(__DRIscreen *screen, cpp, width, height, pitch, name, "image"); if (image->region == NULL) { - FREE(image); + free(image); return NULL; } @@ -371,7 +371,7 @@ static void intel_destroy_image(__DRIimage *image) { intel_region_release(&image->region); - FREE(image); + free(image); } static __DRIimage * @@ -397,7 +397,7 @@ intel_create_image(__DRIscreen *screen, image->region = intel_region_alloc(intelScreen, tiling, cpp, width, height, true); if (image->region == NULL) { - FREE(image); + free(image); return NULL; } @@ -446,7 +446,7 @@ intel_dup_image(__DRIimage *orig_image, void *loaderPrivate) intel_region_reference(&image->region, orig_image->region); if (image->region == NULL) { - FREE(image); + free(image); return NULL; } @@ -543,13 +543,13 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate) pitch = stride / cpp; if (offset + height * cpp * pitch > parent->region->bo->size) { _mesa_warning(NULL, "intel_create_sub_image: subimage out of bounds"); - FREE(image); + free(image); return NULL; } image->region = calloc(sizeof(*image->region), 1); if (image->region == NULL) { - FREE(image); + free(image); return NULL; } @@ -639,7 +639,7 @@ intelDestroyScreen(__DRIscreen * sPriv) _mesa_HashDeleteAll(intelScreen->named_regions, nop_callback, NULL); _mesa_DeleteHashTable(intelScreen->named_regions); - FREE(intelScreen); + free(intelScreen); sPriv->driverPrivate = NULL; } @@ -1156,7 +1156,7 @@ intelAllocateBuffer(__DRIscreen *screen, true); if (intelBuffer->region == NULL) { - FREE(intelBuffer); + free(intelBuffer); return NULL; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c index 1d7db52c43a..717c0b8f11d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c @@ -67,8 +67,8 @@ nouveau_bufferobj_del(struct gl_context *ctx, struct gl_buffer_object *obj) struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj); nouveau_bo_ref(NULL, &nbo->bo); - FREE(nbo->sys); - FREE(nbo); + free(nbo->sys); + free(nbo); } static GLboolean @@ -84,7 +84,7 @@ nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size /* Free previous storage */ nouveau_bo_ref(NULL, &nbo->bo); - FREE(nbo->sys); + free(nbo->sys); if (target == GL_ELEMENT_ARRAY_BUFFER_ARB || (size < 512 && usage == GL_DYNAMIC_DRAW_ARB) || diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 3f65c36f29b..4f78a82846d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -144,7 +144,7 @@ nouveau_destroy_screen(__DRIscreen *dri_screen) nouveau_device_del(&screen->device); - FREE(screen); + free(screen); dri_screen->driverPrivate = NULL; } diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c index 9472bdd7b51..829aa87c473 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_context.c +++ b/src/mesa/drivers/dri/nouveau/nv04_context.c @@ -134,7 +134,7 @@ nv04_context_destroy(struct gl_context *ctx) nouveau_object_del(&nctx->hw.surf3d); nouveau_context_deinit(ctx); - FREE(ctx); + free(ctx); } static struct gl_context * diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c index a2448caaf81..97fc84d0a85 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_context.c +++ b/src/mesa/drivers/dri/nouveau/nv10_context.c @@ -423,7 +423,7 @@ nv10_context_destroy(struct gl_context *ctx) nouveau_object_del(&nctx->hw.eng3d); nouveau_context_deinit(ctx); - FREE(ctx); + free(ctx); } static struct gl_context * diff --git a/src/mesa/drivers/dri/nouveau/nv20_context.c b/src/mesa/drivers/dri/nouveau/nv20_context.c index 5a36c8766d7..52013fd2008 100644 --- a/src/mesa/drivers/dri/nouveau/nv20_context.c +++ b/src/mesa/drivers/dri/nouveau/nv20_context.c @@ -434,7 +434,7 @@ nv20_context_destroy(struct gl_context *ctx) nouveau_object_del(&nctx->hw.eng3d); nouveau_context_deinit(ctx); - FREE(ctx); + free(ctx); } static struct gl_context * diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 523a89dfc5e..f8add0f309d 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -281,7 +281,7 @@ GLboolean r200CreateContext( gl_api api, if (!radeonInitContext(&rmesa->radeon, &functions, glVisual, driContextPriv, sharedContextPrivate)) { - FREE(rmesa); + free(rmesa); *error = __DRI_CTX_ERROR_NO_MEMORY; return GL_FALSE; } diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 8ea8925d8a2..6a56891ba41 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -202,9 +202,9 @@ static void radeon_destroy_atom_list(radeonContextPtr radeon) struct radeon_state_atom *atom; foreach(atom, &radeon->hw.atomlist) { - FREE(atom->cmd); + free(atom->cmd); if (atom->lastcmd) - FREE(atom->lastcmd); + free(atom->lastcmd); } } @@ -267,7 +267,7 @@ void radeonDestroyContext(__DRIcontext *driContextPriv ) fclose(track); } #endif - FREE(radeon); + free(radeon); } /* Force the context `c' to be unbound from its buffer. diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index ebc0c697003..2b99e36b2a3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -243,7 +243,7 @@ r100CreateContext( gl_api api, if (!radeonInitContext(&rmesa->radeon, &functions, glVisual, driContextPriv, sharedContextPrivate)) { - FREE(rmesa); + free(rmesa); *error = __DRI_CTX_ERROR_NO_MEMORY; return GL_FALSE; } diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c index 61cddda5dc1..2ffbc6df9af 100644 --- a/src/mesa/drivers/dri/radeon/radeon_dma.c +++ b/src/mesa/drivers/dri/radeon/radeon_dma.c @@ -302,19 +302,19 @@ void radeonFreeDmaRegions(radeonContextPtr rmesa) foreach_s(dma_bo, temp, &rmesa->dma.free) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - FREE(dma_bo); + free(dma_bo); } foreach_s(dma_bo, temp, &rmesa->dma.wait) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - FREE(dma_bo); + free(dma_bo); } foreach_s(dma_bo, temp, &rmesa->dma.reserved) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - FREE(dma_bo); + free(dma_bo); } } @@ -344,7 +344,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa) { struct radeon_dma_bo *dma_bo; struct radeon_dma_bo *temp; - const int expire_at = ++rmesa->dma.free.expire_counter + DMA_BO_FREE_TIME; + const int expire_at = ++rmesa->dma.free.expire_counter + DMA_BO_free_TIME; const int time = rmesa->dma.free.expire_counter; if (RADEON_DEBUG & RADEON_DMA) { @@ -371,14 +371,14 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa) WARN_ONCE("Leaking dma buffer object!\n"); radeon_bo_unref(dma_bo->bo); remove_from_list(dma_bo); - FREE(dma_bo); + free(dma_bo); continue; } /* free objects that are too small to be used because of large request */ if (dma_bo->bo->size < rmesa->dma.minimum_size) { radeon_bo_unref(dma_bo->bo); remove_from_list(dma_bo); - FREE(dma_bo); + free(dma_bo); continue; } if (!radeon_bo_is_idle(dma_bo->bo)) { @@ -396,7 +396,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa) if (dma_bo->bo->size < rmesa->dma.minimum_size) { radeon_bo_unref(dma_bo->bo); remove_from_list(dma_bo); - FREE(dma_bo); + free(dma_bo); continue; } remove_from_list(dma_bo); @@ -410,7 +410,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa) break; remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); - FREE(dma_bo); + free(dma_bo); } } diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 8384eb1c912..acd4cc1e2c5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -251,7 +251,7 @@ radeon_create_image_from_name(__DRIscreen *screen, 0); if (image->bo == NULL) { - FREE(image); + free(image); return NULL; } @@ -298,7 +298,7 @@ static void radeon_destroy_image(__DRIimage *image) { radeon_bo_unref(image->bo); - FREE(image); + free(image); } static __DRIimage * @@ -351,7 +351,7 @@ radeon_create_image(__DRIscreen *screen, 0); if (image->bo == NULL) { - FREE(image); + free(image); return NULL; } @@ -507,7 +507,7 @@ radeonCreateScreen2(__DRIscreen *sPriv) ret = radeonGetParam(sPriv, RADEON_PARAM_DEVICE_ID, &device_id); if (ret) { - FREE( screen ); + free( screen ); fprintf(stderr, "drm_radeon_getparam_t (RADEON_PARAM_DEVICE_ID): %d\n", ret); return NULL; } @@ -561,7 +561,7 @@ radeonDestroyScreen( __DRIscreen *sPriv ) /* free all option information */ driDestroyOptionInfo (&screen->optionCache); - FREE( screen ); + free( screen ); sPriv->driverPrivate = NULL; } diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index f0ff0b0aaf3..5ce1eb02942 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -504,7 +504,7 @@ drawable_fail: if (drawable) free(drawable->row); - FREE(drawable); + free(drawable); return GL_FALSE; } @@ -806,7 +806,7 @@ dri_create_context(gl_api api, context_fail: - FREE(ctx); + free(ctx); return GL_FALSE; } diff --git a/src/mesa/drivers/x11/xfonts.c b/src/mesa/drivers/x11/xfonts.c index ac275bb6aef..183de40554b 100644 --- a/src/mesa/drivers/x11/xfonts.c +++ b/src/mesa/drivers/x11/xfonts.c @@ -363,7 +363,7 @@ Fake_glXUseXFont(Font font, int first, int count, int listbase) glEndList(); } - FREE(bm); + free(bm); XFreeFontInfo(NULL, fs, 1); XFreeGC(dpy, gc); diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 8f268a65e2f..152340b5fde 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1438,7 +1438,7 @@ GLboolean _ae_create_context( struct gl_context *ctx ) void _ae_destroy_context( struct gl_context *ctx ) { if ( AE_CONTEXT( ctx ) ) { - FREE( ctx->aelt_context ); + free(ctx->aelt_context); ctx->aelt_context = NULL; } } diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 6b0a76ae9d3..b3d10d31edf 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1314,8 +1314,8 @@ _mesa_PopAttrib(void) } next = attr->next; - FREE( attr->data ); - FREE( attr ); + free(attr->data); + free(attr); attr = next; } } @@ -1592,8 +1592,8 @@ _mesa_PopClientAttrib(void) } next = node->next; - FREE( node->data ); - FREE( node ); + free(node->data); + free(node); node = next; } } diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 950cc4f0856..796b6beff7c 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -391,7 +391,7 @@ _mesa_get_msg(struct gl_context *ctx, GLenum *source, GLenum *type, } if (msg->message != (char*)out_of_memory) - FREE(msg->message); + free(msg->message); msg->message = NULL; msg->length = 0; @@ -786,7 +786,7 @@ _mesa_free_errors_data(struct gl_context *ctx) foreach_s(node, tmp, &ClientIDs->Namespaces[s][t].Severity[sev]) { entry = (struct gl_client_severity *)node; - FREE(entry); + free(entry); } } } diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index 348b7ac7f00..0ae349f2dce 100644 --- a/src/mesa/main/eval.c +++ b/src/mesa/main/eval.c @@ -416,7 +416,7 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, map->u2 = u2; map->du = 1.0F / (u2 - u1); if (map->Points) - FREE( map->Points ); + free( map->Points ); map->Points = pnts; } @@ -516,7 +516,7 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, map->v2 = v2; map->dv = 1.0F / (v2 - v1); if (map->Points) - FREE( map->Points ); + free( map->Points ); map->Points = pnts; } @@ -1048,44 +1048,44 @@ void _mesa_free_eval_data( struct gl_context *ctx ) /* Free evaluator data */ if (ctx->EvalMap.Map1Vertex3.Points) - FREE( ctx->EvalMap.Map1Vertex3.Points ); + free( ctx->EvalMap.Map1Vertex3.Points ); if (ctx->EvalMap.Map1Vertex4.Points) - FREE( ctx->EvalMap.Map1Vertex4.Points ); + free( ctx->EvalMap.Map1Vertex4.Points ); if (ctx->EvalMap.Map1Index.Points) - FREE( ctx->EvalMap.Map1Index.Points ); + free( ctx->EvalMap.Map1Index.Points ); if (ctx->EvalMap.Map1Color4.Points) - FREE( ctx->EvalMap.Map1Color4.Points ); + free( ctx->EvalMap.Map1Color4.Points ); if (ctx->EvalMap.Map1Normal.Points) - FREE( ctx->EvalMap.Map1Normal.Points ); + free( ctx->EvalMap.Map1Normal.Points ); if (ctx->EvalMap.Map1Texture1.Points) - FREE( ctx->EvalMap.Map1Texture1.Points ); + free( ctx->EvalMap.Map1Texture1.Points ); if (ctx->EvalMap.Map1Texture2.Points) - FREE( ctx->EvalMap.Map1Texture2.Points ); + free( ctx->EvalMap.Map1Texture2.Points ); if (ctx->EvalMap.Map1Texture3.Points) - FREE( ctx->EvalMap.Map1Texture3.Points ); + free( ctx->EvalMap.Map1Texture3.Points ); if (ctx->EvalMap.Map1Texture4.Points) - FREE( ctx->EvalMap.Map1Texture4.Points ); + free( ctx->EvalMap.Map1Texture4.Points ); for (i = 0; i < 16; i++) - FREE((ctx->EvalMap.Map1Attrib[i].Points)); + free((ctx->EvalMap.Map1Attrib[i].Points)); if (ctx->EvalMap.Map2Vertex3.Points) - FREE( ctx->EvalMap.Map2Vertex3.Points ); + free( ctx->EvalMap.Map2Vertex3.Points ); if (ctx->EvalMap.Map2Vertex4.Points) - FREE( ctx->EvalMap.Map2Vertex4.Points ); + free( ctx->EvalMap.Map2Vertex4.Points ); if (ctx->EvalMap.Map2Index.Points) - FREE( ctx->EvalMap.Map2Index.Points ); + free( ctx->EvalMap.Map2Index.Points ); if (ctx->EvalMap.Map2Color4.Points) - FREE( ctx->EvalMap.Map2Color4.Points ); + free( ctx->EvalMap.Map2Color4.Points ); if (ctx->EvalMap.Map2Normal.Points) - FREE( ctx->EvalMap.Map2Normal.Points ); + free( ctx->EvalMap.Map2Normal.Points ); if (ctx->EvalMap.Map2Texture1.Points) - FREE( ctx->EvalMap.Map2Texture1.Points ); + free( ctx->EvalMap.Map2Texture1.Points ); if (ctx->EvalMap.Map2Texture2.Points) - FREE( ctx->EvalMap.Map2Texture2.Points ); + free( ctx->EvalMap.Map2Texture2.Points ); if (ctx->EvalMap.Map2Texture3.Points) - FREE( ctx->EvalMap.Map2Texture3.Points ); + free( ctx->EvalMap.Map2Texture3.Points ); if (ctx->EvalMap.Map2Texture4.Points) - FREE( ctx->EvalMap.Map2Texture4.Points ); + free( ctx->EvalMap.Map2Texture4.Points ); for (i = 0; i < 16; i++) - FREE((ctx->EvalMap.Map2Attrib[i].Points)); + free((ctx->EvalMap.Map2Attrib[i].Points)); } diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index a775a9a36a2..a6193071d5f 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -693,7 +693,7 @@ free_matrix_stack( struct gl_matrix_stack *stack ) for (i = 0; i < stack->MaxDepth; i++) { _math_matrix_dtr(&stack->Stack[i]); } - FREE(stack->Stack); + free(stack->Stack); stack->Stack = stack->Top = NULL; } diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 8bf5f490a12..4514b122421 100644 --- a/src/mesa/main/samplerobj.c +++ b/src/mesa/main/samplerobj.c @@ -155,7 +155,7 @@ void _mesa_delete_sampler_object(struct gl_context *ctx, struct gl_sampler_object *sampObj) { - FREE(sampObj); + free(sampObj); } diff --git a/src/mesa/program/nvfragparse.c b/src/mesa/program/nvfragparse.c index 150e2312eda..f61221c1112 100644 --- a/src/mesa/program/nvfragparse.c +++ b/src/mesa/program/nvfragparse.c @@ -1550,7 +1550,7 @@ _mesa_parse_nv_fragment_program(struct gl_context *ctx, GLenum dstTarget, /* install the program */ program->Base.Target = target; if (program->Base.String) { - FREE(program->Base.String); + free(program->Base.String); } program->Base.String = programString; program->Base.Format = GL_PROGRAM_FORMAT_ASCII_ARB; diff --git a/src/mesa/state_tracker/st_cb_syncobj.c b/src/mesa/state_tracker/st_cb_syncobj.c index d575a84974b..f9f2348a3e1 100644 --- a/src/mesa/state_tracker/st_cb_syncobj.c +++ b/src/mesa/state_tracker/st_cb_syncobj.c @@ -60,7 +60,7 @@ static void st_delete_sync_object(struct gl_context *ctx, struct st_sync_object *so = (struct st_sync_object*)obj; screen->fence_reference(screen, &so->fence, NULL); - FREE(so); + free(so); } static void st_fence_sync(struct gl_context *ctx, struct gl_sync_object *obj, diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index e270cf490b5..852dceaf618 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4772,16 +4772,16 @@ st_translate_program( out: if (t) { - FREE(t->insn); - FREE(t->labels); - FREE(t->constants); - FREE(t->immediates); + free(t->insn); + free(t->labels); + free(t->constants); + free(t->immediates); if (t->error) { debug_printf("%s: translate error flag set\n", __FUNCTION__); } - FREE(t); + free(t); } return ret; diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index df73d0e1bf1..88b886de8a5 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -430,7 +430,7 @@ st_framebuffer_create(struct st_framebuffer_iface *stfbi) /* add the color buffer */ idx = stfb->Base._ColorDrawBufferIndexes[0]; if (!st_framebuffer_add_renderbuffer(stfb, idx)) { - FREE(stfb); + free(stfb); return NULL; } diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 56047141415..5f056b9b1e8 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1259,9 +1259,9 @@ st_translate_mesa_program( } out: - FREE(t->insn); - FREE(t->labels); - FREE(t->constants); + free(t->insn); + free(t->labels); + free(t->constants); if (t->error) { debug_printf("%s: translate error flag set\n", __FUNCTION__); @@ -1278,5 +1278,5 @@ out: void st_free_tokens(const struct tgsi_token *tokens) { - FREE((void *)tokens); + free((void *)tokens); } diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 36015f69adf..9816e22ac26 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -74,7 +74,7 @@ delete_vp_variant(struct st_context *st, struct st_vp_variant *vpv) if (vpv->tgsi.tokens) st_free_tokens(vpv->tgsi.tokens); - FREE( vpv ); + free( vpv ); } @@ -112,7 +112,7 @@ delete_fp_variant(struct st_context *st, struct st_fp_variant *fpv) _mesa_free_parameter_list(fpv->parameters); if (fpv->tgsi.tokens) st_free_tokens(fpv->tgsi.tokens); - FREE(fpv); + free(fpv); } @@ -144,7 +144,7 @@ delete_gp_variant(struct st_context *st, struct st_gp_variant *gpv) if (gpv->driver_shader) cso_delete_geometry_shader(st->cso_context, gpv->driver_shader); - FREE(gpv); + free(gpv); } @@ -316,7 +316,7 @@ st_translate_vertex_program(struct st_context *st, ureg = ureg_create( TGSI_PROCESSOR_VERTEX ); if (ureg == NULL) { - FREE(vpv); + free(vpv); return NULL; } @@ -676,7 +676,7 @@ st_translate_fragment_program(struct st_context *st, ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT ); if (ureg == NULL) { - FREE(variant); + free(variant); return NULL; } @@ -836,7 +836,7 @@ st_translate_geometry_program(struct st_context *st, ureg = ureg_create( TGSI_PROCESSOR_GEOMETRY ); if (ureg == NULL) { - FREE(gpv); + free(gpv); return NULL; } diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 055f4cc4ddb..53497bc9c40 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -777,7 +777,7 @@ _swrast_CreateContext( struct gl_context *ctx ) */ swrast->SpanArrays = (SWspanarrays *) malloc(maxThreads * sizeof(SWspanarrays)); if (!swrast->SpanArrays) { - FREE(swrast); + free(swrast); return GL_FALSE; } for(i = 0; i < maxThreads; i++) { @@ -828,17 +828,17 @@ _swrast_DestroyContext( struct gl_context *ctx ) _mesa_debug(ctx, "_swrast_DestroyContext\n"); } - FREE( swrast->SpanArrays ); + free( swrast->SpanArrays ); if (swrast->ZoomedArrays) - FREE( swrast->ZoomedArrays ); - FREE( swrast->TexelBuffer ); + free( swrast->ZoomedArrays ); + free( swrast->TexelBuffer ); free(swrast->stencil_temp.buf1); free(swrast->stencil_temp.buf2); free(swrast->stencil_temp.buf3); free(swrast->stencil_temp.buf4); - FREE( swrast ); + free( swrast ); ctx->swrast_context = 0; } diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index 60898ee38cf..40268be2dfd 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -72,7 +72,7 @@ _swsetup_DestroyContext( struct gl_context *ctx ) SScontext *swsetup = SWSETUP_CONTEXT(ctx); if (swsetup) { - FREE(swsetup); + free(swsetup); ctx->swsetup_context = 0; } diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 2b4bab6917c..aa678393292 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -116,7 +116,7 @@ _tnl_DestroyContext( struct gl_context *ctx ) _tnl_destroy_pipeline( ctx ); - FREE(tnl); + free(tnl); ctx->swtnl_context = NULL; } diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index cd692ddfa85..134cae1c70d 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -259,7 +259,7 @@ free_fog_data(struct tnl_pipeline_stage *stage) struct fog_stage_data *store = FOG_STAGE_DATA(stage); if (store) { _mesa_vector4f_free( &store->fogcoord ); - FREE( store ); + free( store ); stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index a992ea77c62..39ba4968504 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -457,7 +457,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->LitColor[1] ); _mesa_vector4f_free( &store->LitSecondary[0] ); _mesa_vector4f_free( &store->LitSecondary[1] ); - FREE( store ); + free( store ); stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 9222f57dee1..271137f8792 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -546,7 +546,7 @@ dtr(struct tnl_pipeline_stage *stage) _mesa_vector4f_free( &store->ndcCoords ); _mesa_align_free( store->clipmask ); - FREE( store ); + free( store ); stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index 7f754d48e26..c757ac52218 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -589,9 +589,9 @@ static void free_texgen_data( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->texcoord[i] ); - if (store->tmp_f) FREE( store->tmp_f ); - if (store->tmp_m) FREE( store->tmp_m ); - FREE( store ); + if (store->tmp_f) free( store->tmp_f ); + if (store->tmp_m) free( store->tmp_m ); + free( store ); stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index 73022b42463..91bb0f7978f 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -110,7 +110,7 @@ static void free_texmat_data( struct tnl_pipeline_stage *stage ) for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) if (store->texcoord[i].data) _mesa_vector4f_free( &store->texcoord[i] ); - FREE( store ); + free( store ); stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index fe4f72af290..64795a57ed1 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -265,7 +265,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->clip ); _mesa_vector4f_free( &store->proj ); _mesa_align_free( store->clipmask ); - FREE(store); + free(store); stage->privatePtr = NULL; stage->run = init_vertex_stage; } diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index 580f95df3ee..7e83d454d01 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -548,7 +548,7 @@ void _tnl_free_vertices( struct gl_context *ctx ) for (fp = vtx->fastpath ; fp ; fp = tmp) { tmp = fp->next; - FREE(fp->attr); + free(fp->attr); /* KW: At the moment, fp->func is constrained to be allocated by * _mesa_exec_alloc(), as the hardwired fastpaths in @@ -557,7 +557,7 @@ void _tnl_free_vertices( struct gl_context *ctx ) * module gets another overhaul. */ _mesa_exec_free((void *) fp->func); - FREE(fp); + free(fp); } vtx->fastpath = NULL; diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index 5f1c72bc1ca..fd15fb6a9c3 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -223,7 +223,7 @@ void _vbo_DestroyContext( struct gl_context *ctx ) vbo_exec_destroy(ctx); if (ctx->API == API_OPENGL) vbo_save_destroy(ctx); - FREE(vbo); + free(vbo); ctx->swtnl_im = NULL; } } diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c index 7a97d3c6567..a400399273e 100644 --- a/src/mesa/vbo/vbo_save.c +++ b/src/mesa/vbo/vbo_save.c @@ -101,13 +101,13 @@ void vbo_save_destroy( struct gl_context *ctx ) if (save->prim_store) { if ( --save->prim_store->refcount == 0 ) { - FREE( save->prim_store ); + free(save->prim_store); save->prim_store = NULL; } if ( --save->vertex_store->refcount == 0 ) { _mesa_reference_buffer_object(ctx, &save->vertex_store->bufferobj, NULL); - FREE( save->vertex_store ); + free(save->vertex_store); save->vertex_store = NULL; } } diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index bebda7a1c35..636aa1fdb7e 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -233,7 +233,7 @@ free_vertex_store(struct gl_context *ctx, _mesa_reference_buffer_object(ctx, &vertex_store->bufferobj, NULL); } - FREE(vertex_store); + free(vertex_store); } @@ -1575,10 +1575,10 @@ vbo_destroy_vertex_list(struct gl_context *ctx, void *data) free_vertex_store(ctx, node->vertex_store); if (--node->prim_store->refcount == 0) - FREE(node->prim_store); + free(node->prim_store); if (node->current_data) { - FREE(node->current_data); + free(node->current_data); node->current_data = NULL; } }