if (ctx && ctx->st)
ctx->st->destroy(ctx->st);
- FREE(ctx);
+ free(ctx);
return GL_FALSE;
}
* 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
if (ctx->pp) pp_free(ctx->pp);
- FREE(ctx);
+ free(ctx);
}
GLboolean
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
dri_destroy_screen_helper(screen);
- FREE(screen);
+ free(screen);
sPriv->driverPrivate = NULL;
sPriv->extensions = NULL;
}
glEndList();
}
- FREE(bm);
+ free(bm);
XFreeFontInfo(NULL, fs, 1);
XFreeGC(dpy, gc);
xmdpy->screen = NULL;
}
if (xmdpy->smapi) {
- FREE(xmdpy->smapi);
+ free(xmdpy->smapi);
xmdpy->smapi = NULL;
}
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;
}
xstfb = CALLOC_STRUCT(xmesa_st_framebuffer);
if (!stfbi || !xstfb) {
if (stfbi)
- FREE(stfbi);
+ free(stfbi);
if (xstfb)
- FREE(xstfb);
+ free(xstfb);
return NULL;
}
for (i = 0; i < ST_ATTACHMENT_COUNT; i++)
pipe_resource_reference(&xstfb->textures[i], NULL);
- FREE(xstfb);
- FREE(stfbi);
+ free(xstfb);
+ free(stfbi);
}
void
*driver_configs = driDriverAPI.InitScreen(psp);
if (*driver_configs == NULL) {
- FREE(psp);
+ free(psp);
return NULL;
}
{
if (psp) {
driDriverAPI.DestroyScreen(psp);
- FREE(psp);
+ free(psp);
}
}
if (!driDriverAPI.CreateContext(mesa_api, modes, pcp,
major_version, minor_version,
flags, error, shareCtx)) {
- FREE(pcp);
+ free(pcp);
return NULL;
}
{
if (pcp) {
driDriverAPI.DestroyContext(pcp);
- FREE(pcp);
+ free(pcp);
}
}
return;
driDriverAPI.DestroyBuffer(pdp);
- FREE(pdp);
+ free(pdp);
}
}
dri_get_drawable(pdp);
if (!driDriverAPI.CreateBuffer(psp, pdp, &config->modes, GL_FALSE)) {
- FREE(pdp);
+ free(pdp);
return NULL;
}
else
range = NULL;
}
- FREE (cp);
+ free(cp);
if (i < nRanges) {
- FREE (ranges);
+ free(ranges);
return GL_FALSE;
} else
assert (range == NULL);
}
if (filenames[1])
- FREE (filenames[1]);
+ free(filenames[1]);
}
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,
if (!intelInitContext(intel, __DRI_API_OPENGL, mesaVis, driContextPriv,
sharedContextPrivate, &functions)) {
- FREE(i830);
+ free(i830);
return false;
}
if (!intelInitContext(intel, api, mesaVis, driContextPriv,
sharedContextPrivate, &functions)) {
- FREE(i915);
+ free(i915);
*error = __DRI_CTX_ERROR_NO_MEMORY;
return false;
}
if (req_version > max_version) {
*error = __DRI_CTX_ERROR_BAD_VERSION;
- FREE(i915);
+ free(i915);
return false;
}
break;
break;
default:
*error = __DRI_CTX_ERROR_BAD_API;
- FREE(i915);
+ free(i915);
return false;
}
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;
}
items[c->hash % size] = c;
}
- FREE(cache->items);
+ free(cache->items);
cache->items = items;
cache->size = size;
}
cpp, width, height,
pitch, name, "image");
if (image->region == NULL) {
- FREE(image);
+ free(image);
return NULL;
}
intel_destroy_image(__DRIimage *image)
{
intel_region_release(&image->region);
- FREE(image);
+ free(image);
}
static __DRIimage *
image->region =
intel_region_alloc(intelScreen, tiling, cpp, width, height, true);
if (image->region == NULL) {
- FREE(image);
+ free(image);
return NULL;
}
intel_region_reference(&image->region, orig_image->region);
if (image->region == NULL) {
- FREE(image);
+ free(image);
return NULL;
}
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;
}
_mesa_HashDeleteAll(intelScreen->named_regions, nop_callback, NULL);
_mesa_DeleteHashTable(intelScreen->named_regions);
- FREE(intelScreen);
+ free(intelScreen);
sPriv->driverPrivate = NULL;
}
true);
if (intelBuffer->region == NULL) {
- FREE(intelBuffer);
+ free(intelBuffer);
return NULL;
}
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
/* 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) ||
nouveau_device_del(&screen->device);
- FREE(screen);
+ free(screen);
dri_screen->driverPrivate = NULL;
}
nouveau_object_del(&nctx->hw.surf3d);
nouveau_context_deinit(ctx);
- FREE(ctx);
+ free(ctx);
}
static struct gl_context *
nouveau_object_del(&nctx->hw.eng3d);
nouveau_context_deinit(ctx);
- FREE(ctx);
+ free(ctx);
}
static struct gl_context *
nouveau_object_del(&nctx->hw.eng3d);
nouveau_context_deinit(ctx);
- FREE(ctx);
+ free(ctx);
}
static struct gl_context *
if (!radeonInitContext(&rmesa->radeon, &functions,
glVisual, driContextPriv,
sharedContextPrivate)) {
- FREE(rmesa);
+ free(rmesa);
*error = __DRI_CTX_ERROR_NO_MEMORY;
return GL_FALSE;
}
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);
}
}
fclose(track);
}
#endif
- FREE(radeon);
+ free(radeon);
}
/* Force the context `c' to be unbound from its buffer.
if (!radeonInitContext(&rmesa->radeon, &functions,
glVisual, driContextPriv,
sharedContextPrivate)) {
- FREE(rmesa);
+ free(rmesa);
*error = __DRI_CTX_ERROR_NO_MEMORY;
return GL_FALSE;
}
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);
}
}
{
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) {
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)) {
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);
break;
remove_from_list(dma_bo);
radeon_bo_unref(dma_bo->bo);
- FREE(dma_bo);
+ free(dma_bo);
}
}
0);
if (image->bo == NULL) {
- FREE(image);
+ free(image);
return NULL;
}
radeon_destroy_image(__DRIimage *image)
{
radeon_bo_unref(image->bo);
- FREE(image);
+ free(image);
}
static __DRIimage *
0);
if (image->bo == NULL) {
- FREE(image);
+ free(image);
return NULL;
}
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;
}
/* free all option information */
driDestroyOptionInfo (&screen->optionCache);
- FREE( screen );
+ free( screen );
sPriv->driverPrivate = NULL;
}
if (drawable)
free(drawable->row);
- FREE(drawable);
+ free(drawable);
return GL_FALSE;
}
context_fail:
- FREE(ctx);
+ free(ctx);
return GL_FALSE;
}
glEndList();
}
- FREE(bm);
+ free(bm);
XFreeFontInfo(NULL, fs, 1);
XFreeGC(dpy, gc);
void _ae_destroy_context( struct gl_context *ctx )
{
if ( AE_CONTEXT( ctx ) ) {
- FREE( ctx->aelt_context );
+ free(ctx->aelt_context);
ctx->aelt_context = NULL;
}
}
}
next = attr->next;
- FREE( attr->data );
- FREE( attr );
+ free(attr->data);
+ free(attr);
attr = next;
}
}
}
next = node->next;
- FREE( node->data );
- FREE( node );
+ free(node->data);
+ free(node);
node = next;
}
}
}
if (msg->message != (char*)out_of_memory)
- FREE(msg->message);
+ free(msg->message);
msg->message = NULL;
msg->length = 0;
foreach_s(node, tmp, &ClientIDs->Namespaces[s][t].Severity[sev]) {
entry = (struct gl_client_severity *)node;
- FREE(entry);
+ free(entry);
}
}
}
map->u2 = u2;
map->du = 1.0F / (u2 - u1);
if (map->Points)
- FREE( map->Points );
+ free( map->Points );
map->Points = pnts;
}
map->v2 = v2;
map->dv = 1.0F / (v2 - v1);
if (map->Points)
- FREE( map->Points );
+ free( map->Points );
map->Points = pnts;
}
/* 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));
}
for (i = 0; i < stack->MaxDepth; i++) {
_math_matrix_dtr(&stack->Stack[i]);
}
- FREE(stack->Stack);
+ free(stack->Stack);
stack->Stack = stack->Top = NULL;
}
_mesa_delete_sampler_object(struct gl_context *ctx,
struct gl_sampler_object *sampObj)
{
- FREE(sampObj);
+ free(sampObj);
}
/* 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;
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,
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;
/* add the color buffer */
idx = stfb->Base._ColorDrawBufferIndexes[0];
if (!st_framebuffer_add_renderbuffer(stfb, idx)) {
- FREE(stfb);
+ free(stfb);
return NULL;
}
}
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__);
void
st_free_tokens(const struct tgsi_token *tokens)
{
- FREE((void *)tokens);
+ free((void *)tokens);
}
if (vpv->tgsi.tokens)
st_free_tokens(vpv->tgsi.tokens);
- FREE( vpv );
+ free( vpv );
}
_mesa_free_parameter_list(fpv->parameters);
if (fpv->tgsi.tokens)
st_free_tokens(fpv->tgsi.tokens);
- FREE(fpv);
+ free(fpv);
}
if (gpv->driver_shader)
cso_delete_geometry_shader(st->cso_context, gpv->driver_shader);
- FREE(gpv);
+ free(gpv);
}
ureg = ureg_create( TGSI_PROCESSOR_VERTEX );
if (ureg == NULL) {
- FREE(vpv);
+ free(vpv);
return NULL;
}
ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
if (ureg == NULL) {
- FREE(variant);
+ free(variant);
return NULL;
}
ureg = ureg_create( TGSI_PROCESSOR_GEOMETRY );
if (ureg == NULL) {
- FREE(gpv);
+ free(gpv);
return NULL;
}
*/
swrast->SpanArrays = (SWspanarrays *) malloc(maxThreads * sizeof(SWspanarrays));
if (!swrast->SpanArrays) {
- FREE(swrast);
+ free(swrast);
return GL_FALSE;
}
for(i = 0; i < maxThreads; i++) {
_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;
}
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
if (swsetup) {
- FREE(swsetup);
+ free(swsetup);
ctx->swsetup_context = 0;
}
_tnl_destroy_pipeline( ctx );
- FREE(tnl);
+ free(tnl);
ctx->swtnl_context = NULL;
}
struct fog_stage_data *store = FOG_STAGE_DATA(stage);
if (store) {
_mesa_vector4f_free( &store->fogcoord );
- FREE( store );
+ free( store );
stage->privatePtr = NULL;
}
}
_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;
}
}
_mesa_vector4f_free( &store->ndcCoords );
_mesa_align_free( store->clipmask );
- FREE( store );
+ free( store );
stage->privatePtr = NULL;
}
}
_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;
}
}
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;
}
}
_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;
}
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
* module gets another overhaul.
*/
_mesa_exec_free((void *) fp->func);
- FREE(fp);
+ free(fp);
}
vtx->fastpath = NULL;
vbo_exec_destroy(ctx);
if (ctx->API == API_OPENGL)
vbo_save_destroy(ctx);
- FREE(vbo);
+ free(vbo);
ctx->swtnl_im = NULL;
}
}
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;
}
}
_mesa_reference_buffer_object(ctx, &vertex_store->bufferobj, NULL);
}
- FREE(vertex_store);
+ free(vertex_store);
}
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;
}
}