diff options
Diffstat (limited to 'src/mesa/drivers/dri')
31 files changed, 112 insertions, 112 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 58a94b58682..9142dd72f5a 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -242,12 +242,12 @@ __driUtilUpdateDrawableInfo(__DRIdrawable *pdp) } if (pdp->pClipRects) { - _mesa_free(pdp->pClipRects); + free(pdp->pClipRects); pdp->pClipRects = NULL; } if (pdp->pBackClipRects) { - _mesa_free(pdp->pBackClipRects); + free(pdp->pBackClipRects); pdp->pBackClipRects = NULL; } @@ -324,7 +324,7 @@ static void driSwapBuffers(__DRIdrawable *dPriv) if (!dPriv->numClipRects) return; - rects = _mesa_malloc(sizeof(*rects) * dPriv->numClipRects); + rects = malloc(sizeof(*rects) * dPriv->numClipRects); if (!rects) return; @@ -337,7 +337,7 @@ static void driSwapBuffers(__DRIdrawable *dPriv) } driReportDamage(dPriv, rects, dPriv->numClipRects); - _mesa_free(rects); + free(rects); } static int driDrawableGetMSC( __DRIscreen *sPriv, __DRIdrawable *dPriv, @@ -430,7 +430,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config, */ (void) attrs; - pdp = _mesa_malloc(sizeof *pdp); + pdp = malloc(sizeof *pdp); if (!pdp) { return NULL; } @@ -457,7 +457,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config, if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, &config->modes, renderType == GLX_PIXMAP_BIT)) { - _mesa_free(pdp); + free(pdp); return NULL; } @@ -510,14 +510,14 @@ static void dri_put_drawable(__DRIdrawable *pdp) psp = pdp->driScreenPriv; (*psp->DriverAPI.DestroyBuffer)(pdp); if (pdp->pClipRects && pdp->pClipRects != &pdp->dri2.clipRect) { - _mesa_free(pdp->pClipRects); + free(pdp->pClipRects); pdp->pClipRects = NULL; } if (pdp->pBackClipRects && pdp->pClipRects != &pdp->dri2.clipRect) { - _mesa_free(pdp->pBackClipRects); + free(pdp->pBackClipRects); pdp->pBackClipRects = NULL; } - _mesa_free(pdp); + free(pdp); } } @@ -547,7 +547,7 @@ driDestroyContext(__DRIcontext *pcp) { if (pcp) { (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp); - _mesa_free(pcp); + free(pcp); } } @@ -577,7 +577,7 @@ driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config, __DRIcontext *pcp; void * const shareCtx = (shared != NULL) ? shared->driverPrivate : NULL; - pcp = _mesa_malloc(sizeof *pcp); + pcp = malloc(sizeof *pcp); if (!pcp) return NULL; @@ -602,7 +602,7 @@ driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config, pcp->hHWContext = hwContext; if ( !(*psp->DriverAPI.CreateContext)(&config->modes, pcp, shareCtx) ) { - _mesa_free(pcp); + free(pcp); return NULL; } @@ -656,7 +656,7 @@ static void driDestroyScreen(__DRIscreen *psp) (void)drmCloseOnce(psp->fd); } - _mesa_free(psp); + free(psp); } } @@ -718,7 +718,7 @@ driCreateNewScreen(int scrn, static const __DRIextension *emptyExtensionList[] = { NULL }; __DRIscreen *psp; - psp = _mesa_calloc(sizeof *psp); + psp = calloc(1, sizeof *psp); if (!psp) return NULL; @@ -763,7 +763,7 @@ driCreateNewScreen(int scrn, *driver_modes = driDriverAPI.InitScreen(psp); if (*driver_modes == NULL) { - _mesa_free(psp); + free(psp); return NULL; } @@ -785,7 +785,7 @@ dri2CreateNewScreen(int scrn, int fd, if (driDriverAPI.InitScreen2 == NULL) return NULL; - psp = _mesa_calloc(sizeof(*psp)); + psp = calloc(1, sizeof(*psp)); if (!psp) return NULL; @@ -807,7 +807,7 @@ dri2CreateNewScreen(int scrn, int fd, psp->DriverAPI = driDriverAPI; *driver_configs = driDriverAPI.InitScreen2(psp); if (*driver_configs == NULL) { - _mesa_free(psp); + free(psp); return NULL; } diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index fe38f608a97..48a2c662297 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -32,7 +32,7 @@ driDeleteRenderbuffer(struct gl_renderbuffer *rb) /* don't free rb->Data Chances are it's a memory mapped region for * the dri drivers. */ - _mesa_free(rb); + free(rb); } @@ -70,7 +70,7 @@ driNewRenderbuffer(gl_format format, GLvoid *addr, assert(cpp > 0); assert(pitch > 0); - drb = _mesa_calloc(sizeof(driRenderbuffer)); + drb = calloc(1, sizeof(driRenderbuffer)); if (drb) { const GLuint name = 0; diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 833f9ad232a..8c15cbbf735 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -108,7 +108,7 @@ driGetRendererString( char * buffer, const char * hardware_name, cpu = _mesa_get_cpu_string(); if (cpu) { offset += sprintf(buffer + offset, " %s", cpu); - _mesa_free(cpu); + free(cpu); } return offset; @@ -559,7 +559,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, } num_modes = num_depth_stencil_bits * num_db_modes * num_accum_bits * num_msaa_modes; - configs = _mesa_calloc((num_modes + 1) * sizeof *configs); + configs = calloc(1, (num_modes + 1) * sizeof *configs); if (configs == NULL) return NULL; @@ -568,7 +568,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, for ( i = 0 ; i < num_db_modes ; i++ ) { for ( h = 0 ; h < num_msaa_modes; h++ ) { for ( j = 0 ; j < num_accum_bits ; j++ ) { - *c = _mesa_malloc (sizeof **c); + *c = malloc (sizeof **c); modes = &(*c)->modes; c++; @@ -653,7 +653,7 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a, while (b[j] != NULL) j++; - all = _mesa_malloc((i + j + 1) * sizeof *all); + all = malloc((i + j + 1) * sizeof *all); index = 0; for (i = 0; a[i] != NULL; i++) all[index++] = a[i]; @@ -661,8 +661,8 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a, all[index++] = b[j]; all[index++] = NULL; - _mesa_free(a); - _mesa_free(b); + free(a); + free(b); return all; } diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index 0675bb9894f..ac07e57db13 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -340,7 +340,7 @@ fbCreateContext( const __GLcontextModes *glVisual, assert(driContextPriv); /* Allocate the Fb context */ - fbmesa = (fbContextPtr) _mesa_calloc( sizeof(*fbmesa) ); + fbmesa = (fbContextPtr) calloc(1, sizeof(*fbmesa) ); if ( !fbmesa ) return GL_FALSE; @@ -358,7 +358,7 @@ fbCreateContext( const __GLcontextModes *glVisual, ctx = fbmesa->glCtx = _mesa_create_context(glVisual, shareCtx, &functions, (void *) fbmesa); if (!fbmesa->glCtx) { - _mesa_free(fbmesa); + free(fbmesa); return GL_FALSE; } driContextPriv->driverPrivate = fbmesa; @@ -406,7 +406,7 @@ fbDestroyContext( __DRIcontext *driContextPriv ) fbmesa->glCtx->DriverCtx = NULL; _mesa_destroy_context( fbmesa->glCtx ); - _mesa_free( fbmesa ); + free( fbmesa ); } } @@ -449,7 +449,7 @@ fbCreateBuffer( __DRIscreen *driScrnPriv, } if (mesaVis->doubleBufferMode) { /* XXX what are the correct origin/stride values? */ - GLvoid *backBuf = _mesa_malloc(driScrnPriv->fbStride + GLvoid *backBuf = malloc(driScrnPriv->fbStride * driScrnPriv->fbHeight); driRenderbuffer *drb = driNewRenderbuffer(MESA_FORMAT_ARGB8888, backBuf, @@ -503,7 +503,7 @@ fbSwapBuffers( __DRIdrawable *dPriv ) if (ctx->Visual.doubleBufferMode) { int i; int offset = 0; - char *tmp = _mesa_malloc(currentPitch); + char *tmp = malloc(currentPitch); _mesa_notifySwapBuffers( ctx ); /* flush pending rendering comands */ @@ -516,7 +516,7 @@ fbSwapBuffers( __DRIdrawable *dPriv ) offset += currentPitch; } - _mesa_free(tmp); + free(tmp); } } else { diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c index 6cb8edb611f..cb9cd836a07 100644 --- a/src/mesa/drivers/dri/i965/brw_curbe.c +++ b/src/mesa/drivers/dri/i965/brw_curbe.c @@ -199,7 +199,7 @@ static void prepare_constant_buffer(struct brw_context *brw) return; } - buf = (GLfloat *) _mesa_calloc(bufsz); + buf = (GLfloat *) calloc(1, bufsz); /* fragment shader constants */ if (brw->curbe.wm_size) { @@ -294,12 +294,12 @@ static void prepare_constant_buffer(struct brw_context *brw) bufsz == brw->curbe.last_bufsz && memcmp(buf, brw->curbe.last_buf, bufsz) == 0) { /* constants have not changed */ - _mesa_free(buf); + free(buf); } else { /* constants have changed */ if (brw->curbe.last_buf) - _mesa_free(brw->curbe.last_buf); + free(brw->curbe.last_buf); brw->curbe.last_buf = buf; brw->curbe.last_bufsz = bufsz; diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index c46b9ba89ce..ceaeb923b05 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -320,7 +320,7 @@ copy_array_to_vbo_array( struct brw_context *brw, } else { void *data; - data = _mesa_malloc(dst_stride * element->count); + data = malloc(dst_stride * element->count); dest = data; for (i = 0; i < element->count; i++) { memcpy(dest, src, dst_stride); @@ -333,7 +333,7 @@ copy_array_to_vbo_array( struct brw_context *brw, size, data); - _mesa_free(data); + free(data); } } } diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index 1df561386e6..4e7c1226ad4 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -237,7 +237,7 @@ brw_resolve_cals(struct brw_compile *c) struct brw_glsl_call *call, *next; for (call = c->first_call; call; call = next) { next = call->next; - _mesa_free(call); + free(call); } c->first_call = NULL; } @@ -247,7 +247,7 @@ brw_resolve_cals(struct brw_compile *c) struct brw_glsl_label *label, *next; for (label = c->first_label; label; label = next) { next = label->next; - _mesa_free(label); + free(label); } c->first_label = NULL; } diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c index 5399a742449..6cce7e50890 100644 --- a/src/mesa/drivers/dri/i965/brw_queryobj.c +++ b/src/mesa/drivers/dri/i965/brw_queryobj.c @@ -73,7 +73,7 @@ brw_new_query_object(GLcontext *ctx, GLuint id) { struct brw_query_object *query; - query = _mesa_calloc(sizeof(struct brw_query_object)); + query = calloc(1, sizeof(struct brw_query_object)); query->Base.Id = id; query->Base.Result = 0; @@ -89,7 +89,7 @@ brw_delete_query(GLcontext *ctx, struct gl_query_object *q) struct brw_query_object *query = (struct brw_query_object *)q; dri_bo_unreference(query->bo); - _mesa_free(query); + free(query); } static void diff --git a/src/mesa/drivers/dri/i965/brw_state_batch.c b/src/mesa/drivers/dri/i965/brw_state_batch.c index ed8120d617f..39019412fda 100644 --- a/src/mesa/drivers/dri/i965/brw_state_batch.c +++ b/src/mesa/drivers/dri/i965/brw_state_batch.c @@ -57,8 +57,8 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw, if (item->sz == sz && memcmp(item->header, newheader, sz) == 0) return GL_FALSE; if (item->sz != sz) { - _mesa_free(item->header); - item->header = _mesa_malloc(sz); + free(item->header); + item->header = malloc(sz); item->sz = sz; } goto emit; @@ -68,7 +68,7 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw, assert(!item); item = CALLOC_STRUCT(brw_cached_batch_item); - item->header = _mesa_malloc(sz); + item->header = malloc(sz); item->sz = sz; item->next = brw->cached_batch_items; brw->cached_batch_items = item; diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index 1369d97e21b..dd9894d6819 100644 --- a/src/mesa/drivers/dri/i965/brw_state_cache.c +++ b/src/mesa/drivers/dri/i965/brw_state_cache.c @@ -150,7 +150,7 @@ rehash(struct brw_cache *cache) GLuint size, i; size = cache->size * 3; - items = (struct brw_cache_item**) _mesa_calloc(size * sizeof(*items)); + items = (struct brw_cache_item**) calloc(1, size * sizeof(*items)); for (i = 0; i < cache->size; i++) for (c = cache->items[i]; c; c = next) { @@ -237,7 +237,7 @@ brw_upload_cache_with_auxdata(struct brw_cache *cache, /* Set up the memory containing the key, aux_data, and reloc_bufs */ - tmp = _mesa_malloc(key_size + aux_size + relocs_size); + tmp = malloc(key_size + aux_size + relocs_size); memcpy(tmp, key, key_size); memcpy(tmp + key_size, aux, aux_size); @@ -366,7 +366,7 @@ brw_init_non_surface_cache(struct brw_context *brw) cache->size = 7; cache->n_items = 0; cache->items = (struct brw_cache_item **) - _mesa_calloc(cache->size * sizeof(struct brw_cache_item)); + calloc(1, cache->size * sizeof(struct brw_cache_item)); brw_init_cache_id(cache, "CC_VP", BRW_CC_VP); brw_init_cache_id(cache, "CC_UNIT", BRW_CC_UNIT); @@ -403,7 +403,7 @@ brw_init_surface_cache(struct brw_context *brw) cache->size = 7; cache->n_items = 0; cache->items = (struct brw_cache_item **) - _mesa_calloc(cache->size * sizeof(struct brw_cache_item)); + calloc(1, cache->size * sizeof(struct brw_cache_item)); brw_init_cache_id(cache, "SS_SURFACE", BRW_SS_SURFACE); brw_init_cache_id(cache, "SS_SURF_BIND", BRW_SS_SURF_BIND); @@ -444,7 +444,7 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache) cache->n_items = 0; if (brw->curbe.last_buf) { - _mesa_free(brw->curbe.last_buf); + free(brw->curbe.last_buf); brw->curbe.last_buf = NULL; } diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 681319dedfd..0b0be02dd20 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -67,11 +67,11 @@ static void brw_destroy_context( struct intel_context *intel ) brw_draw_destroy( brw ); brw_clear_validated_bos(brw); if (brw->wm.compile_data) { - _mesa_free(brw->wm.compile_data->instruction); - _mesa_free(brw->wm.compile_data->vreg); - _mesa_free(brw->wm.compile_data->refs); - _mesa_free(brw->wm.compile_data->prog_instructions); - _mesa_free(brw->wm.compile_data); + free(brw->wm.compile_data->instruction); + free(brw->wm.compile_data->vreg); + free(brw->wm.compile_data->refs); + free(brw->wm.compile_data->prog_instructions); + free(brw->wm.compile_data); } for (i = 0; i < brw->state.nr_color_regions; i++) diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 9191c81755d..991e1b964b8 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -151,11 +151,11 @@ static void do_wm_prog( struct brw_context *brw, */ return; } - c->instruction = _mesa_calloc(BRW_WM_MAX_INSN * sizeof(*c->instruction)); - c->prog_instructions = _mesa_calloc(BRW_WM_MAX_INSN * + c->instruction = calloc(1, BRW_WM_MAX_INSN * sizeof(*c->instruction)); + c->prog_instructions = calloc(1, BRW_WM_MAX_INSN * sizeof(*c->prog_instructions)); - c->vreg = _mesa_calloc(BRW_WM_MAX_VREG * sizeof(*c->vreg)); - c->refs = _mesa_calloc(BRW_WM_MAX_REF * sizeof(*c->refs)); + c->vreg = calloc(1, BRW_WM_MAX_VREG * sizeof(*c->vreg)); + c->refs = calloc(1, BRW_WM_MAX_REF * sizeof(*c->refs)); } else { void *instruction = c->instruction; void *prog_instructions = c->prog_instructions; diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index 3b7015b5ad3..312866d865d 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -113,7 +113,7 @@ intel_bufferobj_free(GLcontext * ctx, struct gl_buffer_object *obj) if (obj->Pointer) intel_bufferobj_unmap(ctx, 0, obj); - _mesa_free(intel_obj->sys_buffer); + free(intel_obj->sys_buffer); if (intel_obj->region) { intel_bufferobj_release_region(intel, intel_obj); } @@ -121,7 +121,7 @@ intel_bufferobj_free(GLcontext * ctx, struct gl_buffer_object *obj) dri_bo_unreference(intel_obj->buffer); } - _mesa_free(intel_obj); + free(intel_obj); } @@ -155,7 +155,7 @@ intel_bufferobj_data(GLcontext * ctx, dri_bo_unreference(intel_obj->buffer); intel_obj->buffer = NULL; } - _mesa_free(intel_obj->sys_buffer); + free(intel_obj->sys_buffer); intel_obj->sys_buffer = NULL; if (size != 0) { @@ -164,7 +164,7 @@ intel_bufferobj_data(GLcontext * ctx, * with their contents anyway. */ if (target == GL_ARRAY_BUFFER || target == GL_ELEMENT_ARRAY_BUFFER) { - intel_obj->sys_buffer = _mesa_malloc(size); + intel_obj->sys_buffer = malloc(size); if (intel_obj->sys_buffer != NULL) { if (data != NULL) memcpy(intel_obj->sys_buffer, data, size); @@ -373,7 +373,7 @@ intel_bufferobj_map_range(GLcontext * ctx, if ((access & GL_MAP_INVALIDATE_RANGE_BIT) && drm_intel_bo_busy(intel_obj->buffer)) { if (access & GL_MAP_FLUSH_EXPLICIT_BIT) { - intel_obj->range_map_buffer = _mesa_malloc(length); + intel_obj->range_map_buffer = malloc(length); obj->Pointer = intel_obj->range_map_buffer; } else { intel_obj->range_map_bo = drm_intel_bo_alloc(intel->bufmgr, @@ -523,7 +523,7 @@ intel_bufferobj_buffer(struct intel_context *intel, intel_obj->Base.Size, sys_buffer, &intel_obj->Base); - _mesa_free(sys_buffer); + free(sys_buffer); intel_obj->sys_buffer = NULL; } diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index d58ffd95fa6..40b867971d7 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -71,13 +71,13 @@ intel_delete_renderbuffer(struct gl_renderbuffer *rb) ASSERT(irb); if (irb->span_cache != NULL) - _mesa_free(irb->span_cache); + free(irb->span_cache); if (intel && irb->region) { intel_region_release(&irb->region); } - _mesa_free(irb); + free(irb); } @@ -316,7 +316,7 @@ intel_create_renderbuffer(gl_format format) default: _mesa_problem(NULL, "Unexpected intFormat in intel_create_renderbuffer"); - _mesa_free(irb); + free(irb); return NULL; } @@ -468,7 +468,7 @@ intel_wrap_texture(GLcontext * ctx, struct gl_texture_image *texImage) irb->Base.ClassID = INTEL_RB_CLASS; if (!intel_update_wrapper(ctx, irb, texImage)) { - _mesa_free(irb); + free(irb); return NULL; } diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c index eabfbf4af94..54998a63f66 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c @@ -395,7 +395,7 @@ intel_texture_bitmap(GLcontext * ctx, } /* Convert the A1 bitmap to an A8 format suitable for glTexImage */ - a8_bitmap = _mesa_calloc(width * height); + a8_bitmap = calloc(1, width * height); _mesa_expand_bitmap(width, height, unpack, bitmap, a8_bitmap, width, 0xff); if (_mesa_is_bufferobj(unpack->BufferObj)) { @@ -430,7 +430,7 @@ intel_texture_bitmap(GLcontext * ctx, _mesa_PixelStorei(GL_UNPACK_ALIGNMENT, 1); _mesa_TexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, a8_bitmap); - _mesa_free(a8_bitmap); + free(a8_bitmap); meta_set_fragment_program(&intel->meta, &intel->meta.bitmap_fp, fp); _mesa_ProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 0, diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c index 10177228bd8..bd1dd13fb7d 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c @@ -147,7 +147,7 @@ intel_stencil_drawpixels(GLcontext * ctx, /* Unpack the supplied stencil values into a ubyte buffer. */ assert(sizeof(GLstencil) == sizeof(GLubyte)); - stencil_pixels = _mesa_malloc(width * height * sizeof(GLstencil)); + stencil_pixels = malloc(width * height * sizeof(GLstencil)); for (row = 0; row < height; row++) { GLvoid *source = _mesa_image_address2d(unpack, pixels, width, height, @@ -201,7 +201,7 @@ intel_stencil_drawpixels(GLcontext * ctx, _mesa_TexImage2D(GL_TEXTURE_2D, 0, GL_INTENSITY, width, height, 0, GL_RED, GL_UNSIGNED_BYTE, stencil_pixels); ctx->Unpack = old_unpack; - _mesa_free(stencil_pixels); + free(stencil_pixels); meta_set_passthrough_transform(&intel->meta); diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index 97bb97265fb..0072bb15fc3 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -49,7 +49,7 @@ static void get_span_cache(struct intel_renderbuffer *irb, uint32_t offset) { if (irb->span_cache == NULL) { - irb->span_cache = _mesa_malloc(SPAN_CACHE_SIZE); + irb->span_cache = malloc(SPAN_CACHE_SIZE); irb->span_cache_offset = -1; } diff --git a/src/mesa/drivers/dri/intel/intel_syncobj.c b/src/mesa/drivers/dri/intel/intel_syncobj.c index 0d7889d3c25..d67f0cb4a68 100644 --- a/src/mesa/drivers/dri/intel/intel_syncobj.c +++ b/src/mesa/drivers/dri/intel/intel_syncobj.c @@ -50,7 +50,7 @@ intel_new_sync_object(GLcontext *ctx, GLuint id) { struct intel_sync_object *sync; - sync = _mesa_calloc(sizeof(struct intel_sync_object)); + sync = calloc(1, sizeof(struct intel_sync_object)); return &sync->Base; } @@ -61,7 +61,7 @@ intel_delete_sync_object(GLcontext *ctx, struct gl_sync_object *s) struct intel_sync_object *sync = (struct intel_sync_object *)s; drm_intel_bo_unreference(sync->bo); - _mesa_free(sync); + free(sync); } static void diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c index acc66e0ae02..a5810ee500d 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c @@ -277,7 +277,7 @@ struct r300_fragment_program *r300SelectAndTranslateFragmentShader(GLcontext *ct fp = fp->next; } - fp = _mesa_calloc(sizeof(struct r300_fragment_program)); + fp = calloc(1, sizeof(struct r300_fragment_program)); fp->state = state; diff --git a/src/mesa/drivers/dri/r300/r300_shader.c b/src/mesa/drivers/dri/r300/r300_shader.c index 3638010e486..9c24166ec5b 100644 --- a/src/mesa/drivers/dri/r300/r300_shader.c +++ b/src/mesa/drivers/dri/r300/r300_shader.c @@ -39,7 +39,7 @@ static void freeFragProgCache(GLcontext *ctx, struct r300_fragment_program_cont while (fp) { tmp = fp->next; rc_constants_destroy(&fp->code.constants); - _mesa_free(fp); + free(fp); fp = tmp; } } @@ -52,7 +52,7 @@ static void freeVertProgCache(GLcontext *ctx, struct r300_vertex_program_cont *c tmp = vp->next; rc_constants_destroy(&vp->code.constants); _mesa_reference_vertprog(ctx, &vp->Base, NULL); - _mesa_free(vp); + free(vp); vp = tmp; } } diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index a74b7001dd9..6a366b438b8 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -233,7 +233,7 @@ static struct r300_vertex_program *build_program(GLcontext *ctx, struct r300_vertex_program *vp; struct r300_vertex_program_compiler compiler; - vp = _mesa_calloc(sizeof(*vp)); + vp = calloc(1, sizeof(*vp)); vp->Base = _mesa_clone_vertex_program(ctx, mesa_vp); memcpy(&vp->key, wanted_key, sizeof(vp->key)); diff --git a/src/mesa/drivers/dri/r600/r700_oglprog.c b/src/mesa/drivers/dri/r600/r700_oglprog.c index 2a50361199b..b7124e644a3 100644 --- a/src/mesa/drivers/dri/r600/r700_oglprog.c +++ b/src/mesa/drivers/dri/r600/r700_oglprog.c @@ -53,7 +53,7 @@ static void freeVertProgCache(GLcontext *ctx, struct r700_vertex_program_cont *c Clean_Up_Shader(&(vp->r700Shader)); _mesa_reference_vertprog(ctx, &vp->mesa_program, NULL); - _mesa_free(vp); + free(vp); vp = tmp; } } diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index 46481cdff4e..07e0adc8905 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -307,7 +307,7 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, struct r700_vertex_program *vp; unsigned int i; - vp = _mesa_calloc(sizeof(*vp)); + vp = calloc(1, sizeof(*vp)); vp->mesa_program = _mesa_clone_vertex_program(ctx, mesa_vp); if (mesa_vp->IsPositionInvariant) diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c index bc5915d3e43..0897dafbd8b 100644 --- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c +++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c @@ -70,7 +70,7 @@ radeonDeleteBufferObject(GLcontext * ctx, radeon_bo_unref(radeon_obj->bo); } - _mesa_free(radeon_obj); + free(radeon_obj); } diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 56dcc50785c..a8931e8478d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -66,7 +66,7 @@ radeon_delete_renderbuffer(struct gl_renderbuffer *rb) if (rrb && rrb->bo) { radeon_bo_unref(rrb->bo); } - _mesa_free(rrb); + free(rrb); } static void * @@ -511,7 +511,7 @@ radeon_wrap_texture(GLcontext * ctx, struct gl_texture_image *texImage) rrb->base.ClassID = RADEON_RB_CLASS; if (!radeon_update_wrapper(ctx, rrb, texImage)) { - _mesa_free(rrb); + free(rrb); return NULL; } diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c index d0dcf0e431a..04ce12493e6 100644 --- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c +++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c @@ -81,7 +81,7 @@ static struct gl_query_object * radeonNewQueryObject(GLcontext *ctx, GLuint id) { struct radeon_query_object *query; - query = _mesa_calloc(sizeof(struct radeon_query_object)); + query = calloc(1, sizeof(struct radeon_query_object)); query->Base.Id = id; query->Base.Result = 0; @@ -103,7 +103,7 @@ static void radeonDeleteQuery(GLcontext *ctx, struct gl_query_object *q) radeon_bo_unref(query->bo); } - _mesa_free(query); + free(query); } static void radeonWaitQuery(GLcontext *ctx, struct gl_query_object *q) diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 9b9d90bdd02..ff37fd3e86e 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -637,7 +637,7 @@ static GLuint * allocate_image_offsets(GLcontext *ctx, int i; GLuint *offsets; - offsets = _mesa_malloc(depth * sizeof(GLuint)) ; + offsets = malloc(depth * sizeof(GLuint)) ; if (!offsets) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTex[Sub]Image"); return NULL; @@ -736,7 +736,7 @@ static void radeon_store_teximage(GLcontext* ctx, int dims, } if (dims == 3) { - _mesa_free(dstImageOffsets); + free(dstImageOffsets); } radeon_teximage_unmap(image); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 74a001b7898..6f07ac275e8 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -179,7 +179,7 @@ savageInitDriver(__DRIscreen *sPriv) } /* Allocate the private area */ - savageScreen = (savageScreenPrivate *)_mesa_malloc(sizeof(savageScreenPrivate)); + savageScreen = (savageScreenPrivate *)malloc(sizeof(savageScreenPrivate)); if (!savageScreen) return GL_FALSE; @@ -226,7 +226,7 @@ savageInitDriver(__DRIscreen *sPriv) savageScreen->agpTextures.handle, savageScreen->agpTextures.size, (drmAddress *)&(savageScreen->agpTextures.map)) != 0) { - _mesa_free(savageScreen); + free(savageScreen); sPriv->private = NULL; return GL_FALSE; } @@ -246,7 +246,7 @@ savageInitDriver(__DRIscreen *sPriv) savageScreen->aperture.size, (drmAddress *)&savageScreen->aperture.map) != 0) { - _mesa_free(savageScreen); + free(savageScreen); sPriv->private = NULL; return GL_FALSE; } @@ -282,7 +282,7 @@ savageDestroyScreen(__DRIscreen *sPriv) /* free all option information */ driDestroyOptionInfo (&savageScreen->optionCache); - _mesa_free(savageScreen); + free(savageScreen); sPriv->private = NULL; } @@ -300,7 +300,7 @@ savageCreateContext( const __GLcontextModes *mesaVis, savageScreen->sarea_priv_offset); int textureSize[SAVAGE_NR_TEX_HEAPS]; int i; - imesa = (savageContextPtr)_mesa_calloc(sizeof(savageContext)); + imesa = (savageContextPtr)calloc(1, sizeof(savageContext)); if (!imesa) { return GL_FALSE; } @@ -317,7 +317,7 @@ savageCreateContext( const __GLcontextModes *mesaVis, shareCtx = NULL; ctx = _mesa_create_context(mesaVis, shareCtx, &functions, imesa); if (!ctx) { - _mesa_free(imesa); + free(imesa); return GL_FALSE; } driContextPriv->driverPrivate = imesa; @@ -436,7 +436,7 @@ savageCreateContext( const __GLcontextModes *mesaVis, if (ctx->Const.MaxTextureLevels <= 6) { /*spec requires at least 64x64*/ __driUtilMessage("Not enough texture memory. " "Falling back to indirect rendering."); - _mesa_free(imesa); + free(imesa); return GL_FALSE; } @@ -574,7 +574,7 @@ savageDestroyContext(__DRIcontext *driContextPriv) _mesa_destroy_context(imesa->glCtx); /* no longer use vertex_dma_buf*/ - _mesa_free(imesa); + free(imesa); } } diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c index 394be44eac5..1a748ee1264 100644 --- a/src/mesa/drivers/dri/savage/savagetex.c +++ b/src/mesa/drivers/dri/savage/savagetex.c @@ -603,7 +603,7 @@ _savage_texstore_a1114444(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); return GL_TRUE; } @@ -643,7 +643,7 @@ _savage_texstore_a1118888(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); return GL_TRUE; } diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 40535b03b95..b2e7df34e82 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -155,7 +155,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions, TRACE; - psp = _mesa_calloc(sizeof(*psp)); + psp = calloc(1, sizeof(*psp)); if (!psp) return NULL; @@ -184,7 +184,7 @@ static void driDestroyScreen(__DRIscreen *psp) TRACE; if (psp) { - _mesa_free(psp); + free(psp); } } @@ -241,8 +241,8 @@ swrast_delete_renderbuffer(struct gl_renderbuffer *rb) { TRACE; - _mesa_free(rb->Data); - _mesa_free(rb); + free(rb->Data); + free(rb); } static GLboolean @@ -272,11 +272,11 @@ swrast_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb, TRACE; - _mesa_free(rb->Data); + free(rb->Data); swrast_alloc_front_storage(ctx, rb, internalFormat, width, height); - rb->Data = _mesa_malloc(height * xrb->pitch); + rb->Data = malloc(height * xrb->pitch); return GL_TRUE; } @@ -284,7 +284,7 @@ swrast_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb, static struct swrast_renderbuffer * swrast_new_renderbuffer(const GLvisual *visual, GLboolean front) { - struct swrast_renderbuffer *xrb = _mesa_calloc(sizeof *xrb); + struct swrast_renderbuffer *xrb = calloc(1, sizeof *xrb); GLuint pixel_format; TRACE; @@ -358,7 +358,7 @@ driCreateNewDrawable(__DRIscreen *screen, TRACE; - buf = _mesa_calloc(sizeof *buf); + buf = calloc(1, sizeof *buf); if (!buf) return NULL; @@ -366,7 +366,7 @@ driCreateNewDrawable(__DRIscreen *screen, buf->driScreenPriv = screen; - buf->row = _mesa_malloc(MAX_WIDTH * 4); + buf->row = malloc(MAX_WIDTH * 4); /* basic framebuffer setup */ _mesa_initialize_window_framebuffer(&buf->Base, &config->modes); @@ -401,7 +401,7 @@ driDestroyDrawable(__DRIdrawable *buf) if (buf) { struct gl_framebuffer *fb = &buf->Base; - _mesa_free(buf->row); + free(buf->row); fb->DeletePending = GL_TRUE; _mesa_reference_framebuffer(&fb, NULL); @@ -525,7 +525,7 @@ driCreateNewContext(__DRIscreen *screen, const __DRIconfig *config, TRACE; - ctx = _mesa_calloc(sizeof *ctx); + ctx = calloc(1, sizeof *ctx); if (!ctx) return NULL; @@ -540,7 +540,7 @@ driCreateNewContext(__DRIscreen *screen, const __DRIconfig *config, if (!_mesa_initialize_context(&ctx->Base, &config->modes, shared ? &shared->Base : NULL, &functions, (void *) ctx)) { - _mesa_free(ctx); + free(ctx); return NULL; } diff --git a/src/mesa/drivers/dri/unichrome/via_fb.c b/src/mesa/drivers/dri/unichrome/via_fb.c index e4fb29f6c60..bebf0619d0b 100644 --- a/src/mesa/drivers/dri/unichrome/via_fb.c +++ b/src/mesa/drivers/dri/unichrome/via_fb.c @@ -156,7 +156,7 @@ via_alloc_texture(struct via_context *vmesa, } else if (t->memType == VIA_MEM_SYSTEM) { - t->bufAddr = _mesa_malloc(t->size); + t->bufAddr = malloc(t->size); if (!t->bufAddr) goto cleanup; @@ -226,8 +226,8 @@ via_free_texture(struct via_context *vmesa, struct via_tex_buffer *t) else if (t->memType == VIA_MEM_SYSTEM) { remove_from_list(t); vmesa->total_alloc[t->memType] -= t->size; - _mesa_free(t->bufAddr); - _mesa_free(t); + free(t->bufAddr); + free(t); } else if (t->index && viaCheckBreadcrumb(vmesa, t->lastUsed)) { via_do_free_texture( vmesa, t ); |