diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/glcontextmodes.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/windows/gdi/mesa.def | 1 | ||||
-rw-r--r-- | src/mesa/drivers/windows/icd/mesa.def | 1 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 2 | ||||
-rw-r--r-- | src/mesa/glapi/mesadef.py | 1 | ||||
-rw-r--r-- | src/mesa/main/bitset.h | 4 | ||||
-rw-r--r-- | src/mesa/main/ffvertex_prog.c | 2 | ||||
-rw-r--r-- | src/mesa/main/imports.c | 11 | ||||
-rw-r--r-- | src/mesa/main/imports.h | 5 | ||||
-rw-r--r-- | src/mesa/main/renderbuffer.c | 4 | ||||
-rw-r--r-- | src/mesa/main/texcompress_fxt1.c | 4 | ||||
-rw-r--r-- | src/mesa/main/texenvprogram.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/atifragshader.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/prog_cache.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/prog_parameter.c | 4 | ||||
-rw-r--r-- | src/mesa/shader/program.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_depth.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_span.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_stencil.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex_sse.c | 2 | ||||
-rw-r--r-- | src/mesa/vf/vf_sse.c | 2 |
23 files changed, 26 insertions, 46 deletions
diff --git a/src/glx/glcontextmodes.c b/src/glx/glcontextmodes.c index 232031c2ca..257087a802 100644 --- a/src/glx/glcontextmodes.c +++ b/src/glx/glcontextmodes.c @@ -48,17 +48,14 @@ # include <string.h> # define _mesa_malloc(b) malloc(b) # define _mesa_free(m) free(m) -# define _mesa_memset memset #else # ifdef XFree86Server # include <os.h> # include <string.h> # define _mesa_malloc(b) xalloc(b) # define _mesa_free(m) xfree(m) -# define _mesa_memset memset # else # include <X11/Xlibint.h> -# define _mesa_memset memset # define _mesa_malloc(b) Xmalloc(b) # define _mesa_free(m) Xfree(m) # endif /* XFree86Server */ @@ -133,7 +130,7 @@ _gl_copy_visual_to_context_mode(__GLcontextModes * mode, { __GLcontextModes *const next = mode->next; - (void) _mesa_memset(mode, 0, sizeof(__GLcontextModes)); + (void) memset(mode, 0, sizeof(__GLcontextModes)); mode->next = next; mode->visualID = config->vid; @@ -402,7 +399,7 @@ _gl_context_modes_create(unsigned count, size_t minimum_size) break; } - (void) _mesa_memset(*next, 0, size); + (void) memset(*next, 0, size); (*next)->visualID = GLX_DONT_CARE; (*next)->visualType = GLX_DONT_CARE; (*next)->visualRating = GLX_NONE; diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 0ecbef1ef9..4f477cfc6b 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -349,7 +349,7 @@ void brw_upload_state(struct brw_context *brw) * state atoms are ordered correctly in the list. */ struct brw_state_flags examined, prev; - _mesa_memset(&examined, 0, sizeof(examined)); + memset(&examined, 0, sizeof(examined)); prev = *state; for (i = 0; i < Elements(atoms); i++) { diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c index 87387b1e2d..c232cd2791 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -105,7 +105,7 @@ static void brw_update_sampler_state(struct wm_sampler_entry *key, dri_bo *sdc_bo, struct brw_sampler_state *sampler) { - _mesa_memset(sampler, 0, sizeof(*sampler)); + memset(sampler, 0, sizeof(*sampler)); switch (key->minfilter) { case GL_NEAREST: diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def index f82db88bc5..d7d6cfa4e2 100644 --- a/src/mesa/drivers/windows/gdi/mesa.def +++ b/src/mesa/drivers/windows/gdi/mesa.def @@ -899,7 +899,6 @@ EXPORTS _mesa_init_renderbuffer _mesa_initialize_context _mesa_make_current - _mesa_memset _mesa_new_array_object _mesa_new_framebuffer _mesa_new_program diff --git a/src/mesa/drivers/windows/icd/mesa.def b/src/mesa/drivers/windows/icd/mesa.def index 06c384d8b0..f6bd2aa68b 100644 --- a/src/mesa/drivers/windows/icd/mesa.def +++ b/src/mesa/drivers/windows/icd/mesa.def @@ -54,7 +54,6 @@ EXPORTS _mesa_init_driver_functions _mesa_initialize_context _mesa_make_current - _mesa_memset _mesa_new_buffer_object _mesa_new_texture_object _mesa_problem diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index df04e3a101..d70236c2a0 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -336,7 +336,7 @@ clear_32bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb, GLuint *ptr4 = (GLuint *) xrb->ximage->data; if (pixel == 0) { /* common case */ - _mesa_memset(ptr4, pixel, 4 * n); + memset(ptr4, pixel, 4 * n); } else { GLuint i; diff --git a/src/mesa/glapi/mesadef.py b/src/mesa/glapi/mesadef.py index c7e2c086f7..59cea59ac2 100644 --- a/src/mesa/glapi/mesadef.py +++ b/src/mesa/glapi/mesadef.py @@ -134,7 +134,6 @@ def PrintTail(): print '\t_mesa_init_default_imports' print '\t_mesa_initialize_context' print '\t_mesa_make_current' - print '\t_mesa_memset' print '\t_mesa_new_buffer_object' print '\t_mesa_new_texture_object' print '\t_mesa_problem' diff --git a/src/mesa/main/bitset.h b/src/mesa/main/bitset.h index 5463c0a3c9..29468e8486 100644 --- a/src/mesa/main/bitset.h +++ b/src/mesa/main/bitset.h @@ -49,8 +49,8 @@ */ #define BITSET_COPY(x, y) memcpy( (x), (y), sizeof (x) ) #define BITSET_EQUAL(x, y) (_mesa_memcmp( (x), (y), sizeof (x) ) == 0) -#define BITSET_ZERO(x) _mesa_memset( (x), 0, sizeof (x) ) -#define BITSET_ONES(x) _mesa_memset( (x), 0xff, sizeof (x) ) +#define BITSET_ZERO(x) memset( (x), 0, sizeof (x) ) +#define BITSET_ONES(x) memset( (x), 0xff, sizeof (x) ) #define BITSET_BITWORD(b) ((b) / BITSET_WORDBITS) #define BITSET_BIT(b) (1 << ((b) % BITSET_WORDBITS)) diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 867a55242c..48edec657b 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -1590,7 +1590,7 @@ create_new_program( const struct state_key *key, { struct tnl_program p; - _mesa_memset(&p, 0, sizeof(p)); + memset(&p, 0, sizeof(p)); p.state = key; p.program = program; p.eye_position = undef; diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 0abdfca381..d8375bf572 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -244,17 +244,6 @@ _mesa_realloc(void *oldBuffer, size_t oldSize, size_t newSize) return newBuffer; } -/** Wrapper around memset() */ -void -_mesa_memset( void *dst, int val, size_t n ) -{ -#if defined(SUNOS4) - memset( (char *) dst, (int) val, (int) n ); -#else - memset(dst, val, n); -#endif -} - /** * Fill memory with a constant 16bit word. * \param dst destination pointer. diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 8f13d518ea..68d2043c91 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -74,7 +74,7 @@ extern "C" { /** Copy \p BYTES bytes from \p SRC into \p DST */ #define MEMCPY( DST, SRC, BYTES) memcpy(DST, SRC, BYTES) /** Set \p N bytes in \p DST to \p VAL */ -#define MEMSET( DST, VAL, N ) _mesa_memset(DST, VAL, N) +#define MEMSET( DST, VAL, N ) memset(DST, VAL, N) /*@}*/ @@ -544,9 +544,6 @@ extern void * _mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize ); extern void -_mesa_memset( void *dst, int val, size_t n ); - -extern void _mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); extern void diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 4ae5843662..bb0c78382c 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -548,7 +548,7 @@ put_mono_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, ASSERT(rb->DataType == GL_UNSIGNED_BYTE); if (!mask && val0 == val1 && val1 == val2) { /* optimized case */ - _mesa_memset(dst, val0, 3 * count); + memset(dst, val0, 3 * count); } else { GLuint i; @@ -1319,7 +1319,7 @@ put_mono_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, } } else { - _mesa_memset(dst, val, count); + memset(dst, val, count); } } diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c index 85becb80d2..73a31a17ec 100644 --- a/src/mesa/main/texcompress_fxt1.c +++ b/src/mesa/main/texcompress_fxt1.c @@ -406,7 +406,7 @@ fxt1_choose (GLfloat vec[][MAX_COMP], GLint nv, } hist[N_TEXELS]; GLint lenh = 0; - _mesa_memset(hist, 0, sizeof(hist)); + memset(hist, 0, sizeof(hist)); for (k = 0; k < n; k++) { GLint l; @@ -1211,7 +1211,7 @@ fxt1_quantize (GLuint *cc, const GLubyte *lines[], GLint comps) if (comps == 3) { /* make the whole block opaque */ - _mesa_memset(input, -1, sizeof(input)); + memset(input, -1, sizeof(input)); } /* 8 texels each line */ diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 5cc5fdaebd..35a2cebab8 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -1416,7 +1416,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, GLuint unit; struct ureg cf, out; - _mesa_memset(&p, 0, sizeof(p)); + memset(&p, 0, sizeof(p)); p.state = key; p.program = program; diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c index 3e26c43c48..fb2fa4b95f 100644 --- a/src/mesa/shader/atifragshader.c +++ b/src/mesa/shader/atifragshader.c @@ -96,7 +96,7 @@ create_dst_mod_str(GLuint mod) { static char ret_str[1024]; - _mesa_memset(ret_str, 0, 1024); + memset(ret_str, 0, 1024); if (mod & GL_2X_BIT_ATI) strncat(ret_str, "|2X", 1024); diff --git a/src/mesa/shader/prog_cache.c b/src/mesa/shader/prog_cache.c index 9437e59613..8e54f3a5a0 100644 --- a/src/mesa/shader/prog_cache.c +++ b/src/mesa/shader/prog_cache.c @@ -88,7 +88,7 @@ rehash(struct gl_program_cache *cache) size = cache->size * 3; items = (struct cache_item**) _mesa_malloc(size * sizeof(*items)); - _mesa_memset(items, 0, size * sizeof(*items)); + memset(items, 0, size * sizeof(*items)); for (i = 0; i < cache->size; i++) for (c = cache->items[i]; c; c = next) { diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 435e6ceb09..1feb7bd71d 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -146,8 +146,8 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, paramList->NumParameters = oldNum + sz4; - _mesa_memset(¶mList->Parameters[oldNum], 0, - sz4 * sizeof(struct gl_program_parameter)); + memset(¶mList->Parameters[oldNum], 0, + sz4 * sizeof(struct gl_program_parameter)); for (i = 0; i < sz4; i++) { struct gl_program_parameter *p = paramList->Parameters + oldNum + i; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 3bf9a65905..2410ccb047 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -809,7 +809,7 @@ _mesa_find_used_registers(const struct gl_program *prog, { GLuint i, j; - _mesa_memset(used, 0, usedSize); + memset(used, 0, usedSize); for (i = 0; i < prog->NumInstructions; i++) { const struct prog_instruction *inst = prog->Instructions + i; diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index ac5dae2148..36c8db2107 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1438,7 +1438,7 @@ _swrast_clear_depth_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) /* optimized case */ GLushort *dst = (GLushort *) rb->GetPointer(ctx, rb, x, y); GLuint len = width * height * sizeof(GLushort); - _mesa_memset(dst, (clearValue & 0xff), len); + memset(dst, (clearValue & 0xff), len); } else { /* general case */ diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 63a8d4e350..7087f25d27 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -869,7 +869,7 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span) span->writeAll = GL_FALSE; } else { - _mesa_memset(span->array->mask, 1, span->end); + memset(span->array->mask, 1, span->end); span->writeAll = GL_TRUE; } @@ -1338,7 +1338,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) span->writeAll = GL_FALSE; } else { - _mesa_memset(span->array->mask, 1, span->end); + memset(span->array->mask, 1, span->end); span->writeAll = GL_TRUE; } diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index 5e9a4e37c7..aa74b21ee8 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1181,7 +1181,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) /* Note: bottom-to-top raster assumed! */ GLubyte *stencil = (GLubyte *) rb->GetPointer(ctx, rb, x, y); GLuint len = width * height * sizeof(GLubyte); - _mesa_memset(stencil, clearVal, len); + memset(stencil, clearVal, len); } else { /* general case */ @@ -1189,7 +1189,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) for (i = 0; i < height; i++) { GLvoid *stencil = rb->GetPointer(ctx, rb, x, y + i); if (rb->DataType == GL_UNSIGNED_BYTE) { - _mesa_memset(stencil, clearVal, width); + memset(stencil, clearVal, width); } else { _mesa_memset16((short unsigned int*) stencil, clearVal, width); diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c index 7a255d680a..6436cbfc6e 100644 --- a/src/mesa/tnl/t_vertex_sse.c +++ b/src/mesa/tnl/t_vertex_sse.c @@ -648,7 +648,7 @@ void _tnl_generate_sse_emit( GLcontext *ctx ) return; } - _mesa_memset(&p, 0, sizeof(p)); + memset(&p, 0, sizeof(p)); p.ctx = ctx; p.inputs_safe = 0; /* for now */ diff --git a/src/mesa/vf/vf_sse.c b/src/mesa/vf/vf_sse.c index 4d70196ffe..04275903c9 100644 --- a/src/mesa/vf/vf_sse.c +++ b/src/mesa/vf/vf_sse.c @@ -629,7 +629,7 @@ void vf_generate_sse_emit( struct vertex_fetch *vf ) return; } - _mesa_memset(&p, 0, sizeof(p)); + memset(&p, 0, sizeof(p)); p.vf = vf; p.inputs_safe = 0; /* for now */ |