You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
(10) |
Apr
(28) |
May
(41) |
Jun
(91) |
Jul
(63) |
Aug
(45) |
Sep
(37) |
Oct
(80) |
Nov
(91) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(48) |
Feb
(121) |
Mar
(126) |
Apr
(16) |
May
(85) |
Jun
(84) |
Jul
(115) |
Aug
(71) |
Sep
(27) |
Oct
(33) |
Nov
(15) |
Dec
(71) |
2002 |
Jan
(73) |
Feb
(34) |
Mar
(39) |
Apr
(135) |
May
(59) |
Jun
(116) |
Jul
(93) |
Aug
(40) |
Sep
(50) |
Oct
(87) |
Nov
(90) |
Dec
(32) |
2003 |
Jan
(181) |
Feb
(101) |
Mar
(231) |
Apr
(240) |
May
(148) |
Jun
(228) |
Jul
(156) |
Aug
(49) |
Sep
(173) |
Oct
(169) |
Nov
(137) |
Dec
(163) |
2004 |
Jan
(243) |
Feb
(141) |
Mar
(183) |
Apr
(364) |
May
(369) |
Jun
(251) |
Jul
(194) |
Aug
(140) |
Sep
(154) |
Oct
(167) |
Nov
(86) |
Dec
(109) |
2005 |
Jan
(176) |
Feb
(140) |
Mar
(112) |
Apr
(158) |
May
(140) |
Jun
(201) |
Jul
(123) |
Aug
(196) |
Sep
(143) |
Oct
(165) |
Nov
(158) |
Dec
(79) |
2006 |
Jan
(90) |
Feb
(156) |
Mar
(125) |
Apr
(146) |
May
(169) |
Jun
(146) |
Jul
(150) |
Aug
(176) |
Sep
(156) |
Oct
(237) |
Nov
(179) |
Dec
(140) |
2007 |
Jan
(144) |
Feb
(116) |
Mar
(261) |
Apr
(279) |
May
(222) |
Jun
(103) |
Jul
(237) |
Aug
(191) |
Sep
(113) |
Oct
(129) |
Nov
(141) |
Dec
(165) |
2008 |
Jan
(152) |
Feb
(195) |
Mar
(242) |
Apr
(146) |
May
(151) |
Jun
(172) |
Jul
(123) |
Aug
(195) |
Sep
(195) |
Oct
(138) |
Nov
(183) |
Dec
(125) |
2009 |
Jan
(268) |
Feb
(281) |
Mar
(295) |
Apr
(293) |
May
(273) |
Jun
(265) |
Jul
(406) |
Aug
(679) |
Sep
(434) |
Oct
(357) |
Nov
(306) |
Dec
(478) |
2010 |
Jan
(856) |
Feb
(668) |
Mar
(927) |
Apr
(269) |
May
(12) |
Jun
(13) |
Jul
(6) |
Aug
(8) |
Sep
(23) |
Oct
(4) |
Nov
(8) |
Dec
(11) |
2011 |
Jan
(4) |
Feb
(2) |
Mar
(3) |
Apr
(9) |
May
(6) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kristian H. <kr...@bi...> - 2010-02-19 14:50:34
|
On Thu, Feb 18, 2010 at 7:25 PM, Brian Paul <br...@vm...> wrote: > Ian Romanick wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Ian Romanick wrote: >>> All, >>> >>> It's time again to plan what version or versions of Mesa we want to >>> release in Q1 (end of March). It seems like 7.7.1 is a no-brainer. Do >>> we also want to release Mesa 7.8? I haven't been keeping track of >>> master, so I don't know what its state is. Is it pretty stable? Are >>> there any big branches waiting to land? >>> >>> Working backwards from a "last week of March" release, master would have >>> to branch to mesa_7_8_branch during the last week of February. That's >>> roughly 6 weeks away. >>> >>> Thoughts? Opinions? >> >> Assuming this plan still works for people, I'll make the mesa_7_8_branch >> on Friday, February 26th. > > I think we could get by with a shorter "beta" period. There's a few > more things that would be nice to do for 7.8 which I doubt I'd get to > before the 26th: > > 1. GL_APPLE_object_purgeable - I think the last round of patches > looked OK. Chris? > > 2. _mesa_memcpy() -> memcpy(), etc. replacement. There were patches > for this that haven't been applied yet. Maybe someone could pick > those up. I applied the patches from Kenneth Graunke on the list for this. Can we drop _mesa_malloc(), _mesa_calloc() and _mesa_free() and _mesa_bzero() too? What about the _mesa_*printf() functions? It looks to me like they just wrap the platform *printf() functions and don't provide any fallbacks if the platform doesn't provide the function. > 3. I'm tempted to remove some old Mesa drivers such as glide, tdfx, > allegro, ggi, dri/mga, dri/mach64. Maybe more. Any objections? Sounds great. As George suggests, maybe we can drop dri/fb and dri/ffb too? What about d3d? I don't know much about the driver, but I don't see a lot of commits there since 1999 except mechanical changes to keep it compiling. Finally, I'd like to land EGLImage support for the dri2 EGL driver, which I should be able to do next week. thanks, Kristian |
From: Keith W. <ke...@vm...> - 2010-02-19 14:50:19
|
On Fri, 2010-02-19 at 06:35 -0800, Marek Olšák wrote: > I still think st/xorg should use R8, which is well defined as to which > component to store, rather than L8. That's also the reason L8 is not > renderable in OpenGL. I think there's a shortcoming in the interface here. Imagine that Xorg really wants L8 sampling semantics, but is happy rendering R8. We've got a couple of possible ways to address this. One thing that may help in this area is the idea of specifying a pipe_format when the render-target surface is created, with the restriction that the new format is in some sense compatible with the texture's format. Similarly we've talked about having a swizzle operation inside pipe_sampler state. This could be used to construct L8 semantics from an R8 texture. The sampler-views idea can potentially also help here. Keith |
From: Marek O. <ma...@gm...> - 2010-02-19 14:35:47
|
I still think st/xorg should use R8, which is well defined as to which component to store, rather than L8. That's also the reason L8 is not renderable in OpenGL. 2010/2/19 Corbin Simpson <mos...@gm...> > Yeah, I would have nak'd this. Will revert when I get home. > > Posting from a mobile, pardon my terseness. ~ C. > > On Feb 19, 2010 12:56 AM, "Michel Dänzer" <mi...@da...> wrote: > > On Thu, 2010-02-18 at 19:24 -0800, Marek OlXXXXk wrote: > > Module: Mesa > > Branch: master > > Commit: fc427d23439a2702068209957f08990ea29fe21b > > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc427d23439a2702068209957f08990ea29fe21b > > > > Author: Marek Olšák <ma...@gm...> > > Date: Fri Feb 19 04:23:06 2010 +0100 > > > > r300g: remove L8_UNORM from colorbuffer formats > > > > Not renderable in OpenGL anyway. > > The Xorg state tracker uses it though. > > > -- > Earthling Michel Dänzer | http://www.vmware.com > Libre software enthusiast | Debian, X and DRI developer > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Mesa3d-dev mailing list > Mes...@li... > https://lists.sourceforge.net/lists/listinfo/mesa3d-dev > > |
From: George S. <gsa...@gm...> - 2010-02-19 14:01:01
|
On Fri, Feb 19, 2010 at 2:25 AM, Brian Paul <br...@vm...> wrote: > > 3. I'm tempted to remove some old Mesa drivers such as glide, tdfx, > allegro, ggi, dri/mga, dri/mach64. Maybe more. Any objections? > - dri/fb (superceded by swrast ?) - dri/ffb (drm dropped years ago ?) |
From: Marek O. <ma...@gm...> - 2010-02-19 13:14:54
|
Sorry about that. Blitting from L8 to L8 is now broken anyway, I'll look into it today or tomorrow. 2010/2/19 Corbin Simpson <mos...@gm...> > Yeah, I would have nak'd this. Will revert when I get home. > > Posting from a mobile, pardon my terseness. ~ C. > > On Feb 19, 2010 12:56 AM, "Michel Dänzer" <mi...@da...> wrote: > > On Thu, 2010-02-18 at 19:24 -0800, Marek OlXXXXk wrote: > > Module: Mesa > > Branch: master > > Commit: fc427d23439a2702068209957f08990ea29fe21b > > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc427d23439a2702068209957f08990ea29fe21b > > > > Author: Marek Olšák <ma...@gm...> > > Date: Fri Feb 19 04:23:06 2010 +0100 > > > > r300g: remove L8_UNORM from colorbuffer formats > > > > Not renderable in OpenGL anyway. > > The Xorg state tracker uses it though. > > > -- > Earthling Michel Dänzer | http://www.vmware.com > Libre software enthusiast | Debian, X and DRI developer > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Mesa3d-dev mailing list > Mes...@li... > https://lists.sourceforge.net/lists/listinfo/mesa3d-dev > > |
From: Corbin S. <mos...@gm...> - 2010-02-19 09:13:12
|
Yeah, I would have nak'd this. Will revert when I get home. Posting from a mobile, pardon my terseness. ~ C. On Feb 19, 2010 12:56 AM, "Michel Dänzer" <mi...@da...> wrote: On Thu, 2010-02-18 at 19:24 -0800, Marek OlXXXXk wrote: > Module: Mesa > Branch: master > Commit: fc427d23439a2702068209957f08990ea29fe21b > URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc427d23439a2702068209957f08990ea29fe21b > > Author: Marek Olšák <ma...@gm...> > Date: Fri Feb 19 04:23:06 2010 +0100 > > r300g: remove L8_UNORM from colorbuffer formats > > Not renderable in OpenGL anyway. The Xorg state tracker uses it though. -- Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mes...@li... https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
From: Michel D. <mi...@da...> - 2010-02-19 08:54:50
|
On Thu, 2010-02-18 at 19:24 -0800, Marek OlXXXXk wrote: > Module: Mesa > Branch: master > Commit: fc427d23439a2702068209957f08990ea29fe21b > URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc427d23439a2702068209957f08990ea29fe21b > > Author: Marek Olšák <ma...@gm...> > Date: Fri Feb 19 04:23:06 2010 +0100 > > r300g: remove L8_UNORM from colorbuffer formats > > Not renderable in OpenGL anyway. The Xorg state tracker uses it though. -- Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:55
|
This may break the SUNOS4 build, but it's no longer relevant. --- src/mesa/drivers/dri/r300/r300_fragprog_common.c | 2 +- src/mesa/drivers/dri/r300/r300_vertprog.c | 3 +-- src/mesa/main/bitset.h | 2 +- src/mesa/main/imports.c | 11 ----------- src/mesa/main/imports.h | 3 --- src/mesa/main/texenvprogram.c | 4 ++-- 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c index a0e2dd3..f3d8f2f 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c @@ -271,7 +271,7 @@ struct r300_fragment_program *r300SelectAndTranslateFragmentShader(GLcontext *ct fp = fp_list->progs; while (fp) { - if (_mesa_memcmp(&fp->state, &state, sizeof(state)) == 0) { + if (memcmp(&fp->state, &state, sizeof(state)) == 0) { return r300->selected_fp = fp; } fp = fp->next; diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index efdcdb7..a74b700 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -316,8 +316,7 @@ struct r300_vertex_program * r300SelectAndTranslateVertexShader(GLcontext *ctx) wanted_key.WPosAttr = r300->selected_fp->wpos_attr; for (vp = vpc->progs; vp; vp = vp->next) { - if (_mesa_memcmp(&vp->key, &wanted_key, sizeof(wanted_key)) - == 0) { + if (memcmp(&vp->key, &wanted_key, sizeof(wanted_key)) == 0) { return r300->selected_vp = vp; } } diff --git a/src/mesa/main/bitset.h b/src/mesa/main/bitset.h index 29468e8..9f48b3c 100644 --- a/src/mesa/main/bitset.h +++ b/src/mesa/main/bitset.h @@ -48,7 +48,7 @@ /* bitset operations */ #define BITSET_COPY(x, y) memcpy( (x), (y), sizeof (x) ) -#define BITSET_EQUAL(x, y) (_mesa_memcmp( (x), (y), sizeof (x) ) == 0) +#define BITSET_EQUAL(x, y) (memcmp( (x), (y), sizeof (x) ) == 0) #define BITSET_ZERO(x) memset( (x), 0, sizeof (x) ) #define BITSET_ONES(x) memset( (x), 0xff, sizeof (x) ) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index d8375bf..6730500 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -268,17 +268,6 @@ _mesa_bzero( void *dst, size_t n ) #endif } -/** Wrapper around memcmp() */ -int -_mesa_memcmp( const void *s1, const void *s2, size_t n ) -{ -#if defined(SUNOS4) - return memcmp( (char *) s1, (char *) s2, (int) n ); -#else - return memcmp(s1, s2, n); -#endif -} - /*@}*/ diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 68d2043..d5ab7cd 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -549,9 +549,6 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); extern void _mesa_bzero( void *dst, size_t n ); -extern int -_mesa_memcmp( const void *s1, const void *s2, size_t n ); - extern double _mesa_sin(double a); diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 35a2ceb..f790fd6 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -1095,7 +1095,7 @@ static struct ureg emit_combine( struct texenv_fragment_program *p, emit_arith( p, OPCODE_MAD, tmp0, WRITEMASK_XYZW, 0, two, src[0], neg1); - if (_mesa_memcmp(&src[0], &src[1], sizeof(struct ureg)) == 0) + if (memcmp(&src[0], &src[1], sizeof(struct ureg)) == 0) tmp1 = tmp0; else emit_arith( p, OPCODE_MAD, tmp1, WRITEMASK_XYZW, 0, @@ -1494,7 +1494,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, emit_arith( &p, OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef ); emit_arith( &p, OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef ); } - else if (_mesa_memcmp(&cf, &out, sizeof(cf)) != 0) { + else if (memcmp(&cf, &out, sizeof(cf)) != 0) { /* Will wind up in here if no texture enabled or a couple of * other scenarios (GL_REPLACE for instance). */ -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:53
|
This may break the SUNOS4 build, but it's no longer relevant. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 4 +- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/drivers/common/meta.c | 12 +++--- src/mesa/drivers/dri/fb/fb_dri.c | 6 +-- src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c | 6 +- src/mesa/drivers/dri/r300/r300_draw.c | 4 +- src/mesa/drivers/dri/r300/r300_vertprog.c | 2 +- src/mesa/drivers/dri/r600/r700_render.c | 4 +- .../drivers/dri/radeon/radeon_buffer_objects.c | 6 +- src/mesa/drivers/dri/unichrome/via_tex.c | 4 +- src/mesa/drivers/fbdev/glfbdev.c | 2 +- src/mesa/drivers/windows/gdi/mesa.def | 1 - src/mesa/drivers/windows/icd/mesa.def | 1 - src/mesa/drivers/x11/fakeglx.c | 4 +- src/mesa/glapi/mesadef.py | 1 - src/mesa/main/attrib.c | 2 +- src/mesa/main/bitset.h | 2 +- src/mesa/main/bufferobj.c | 8 ++-- src/mesa/main/colortab.c | 2 +- src/mesa/main/dlist.c | 10 ++-- src/mesa/main/extensions.c | 6 +- src/mesa/main/image.c | 48 ++++++++++---------- src/mesa/main/imports.c | 15 +----- src/mesa/main/imports.h | 5 +-- src/mesa/main/macros.h | 2 +- src/mesa/main/renderbuffer.c | 24 +++++----- src/mesa/main/shaders.c | 4 +- src/mesa/main/syncobj.c | 2 +- src/mesa/main/texgetimage.c | 6 +- src/mesa/main/texstore.c | 2 +- src/mesa/shader/arbprogram.c | 2 +- src/mesa/shader/nvfragparse.c | 2 +- src/mesa/shader/nvvertparse.c | 2 +- src/mesa/shader/prog_instruction.c | 2 +- src/mesa/shader/program.c | 2 +- src/mesa/shader/program_parse.tab.c | 2 +- src/mesa/shader/program_parse.y | 2 +- src/mesa/shader/shader_api.c | 2 +- src/mesa/shader/slang/slang_compile_operation.c | 6 +- src/mesa/shader/slang/slang_link.c | 2 +- src/mesa/shader/slang/slang_mem.c | 2 +- src/mesa/shader/slang/slang_utility.c | 4 +- src/mesa/state_tracker/st_cb_bufferobjects.c | 2 +- src/mesa/swrast/s_blend.c | 2 +- src/mesa/swrast/s_copypix.c | 14 +++--- src/mesa/swrast/s_drawpix.c | 2 +- src/mesa/swrast/s_span.c | 16 +++--- src/mesa/swrast/s_stencil.c | 8 ++-- src/mesa/tnl/t_vertex.c | 2 +- src/mesa/tnl/t_vertex_generic.c | 6 +- src/mesa/vbo/vbo_exec_api.c | 20 ++++---- src/mesa/vbo/vbo_exec_draw.c | 16 +++--- src/mesa/vbo/vbo_save_api.c | 20 ++++---- src/mesa/vf/vf.c | 2 +- 54 files changed, 159 insertions(+), 178 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index e3b52f5..9093a0e 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -1020,7 +1020,7 @@ glXChooseVisual( Display *dpy, int screen, int *list ) /* create a new vishandle - the cached one may be stale */ xmvis->vishandle = (XVisualInfo *) _mesa_malloc(sizeof(XVisualInfo)); if (xmvis->vishandle) { - _mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); + memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); } return xmvis->vishandle; } @@ -1809,7 +1809,7 @@ glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) /* create a new vishandle - the cached one may be stale */ xmvis->vishandle = (XVisualInfo *) _mesa_malloc(sizeof(XVisualInfo)); if (xmvis->vishandle) { - _mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); + memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); } return xmvis->vishandle; #endif diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 49d4aae..4f6f083 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -120,7 +120,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->FreeTexImageData = _mesa_free_texture_image_data; driver->MapTexture = NULL; driver->UnmapTexture = NULL; - driver->TextureMemCpy = _mesa_memcpy; + driver->TextureMemCpy = memcpy; driver->IsTextureResident = NULL; driver->UpdateTexturePalette = NULL; diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 7116d92..4dd2293 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -493,12 +493,12 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state) if (state & META_TRANSFORM) { GLuint activeTexture = ctx->Texture.CurrentUnit; - _mesa_memcpy(save->ModelviewMatrix, ctx->ModelviewMatrixStack.Top->m, - 16 * sizeof(GLfloat)); - _mesa_memcpy(save->ProjectionMatrix, ctx->ProjectionMatrixStack.Top->m, - 16 * sizeof(GLfloat)); - _mesa_memcpy(save->TextureMatrix, ctx->TextureMatrixStack[0].Top->m, - 16 * sizeof(GLfloat)); + memcpy(save->ModelviewMatrix, ctx->ModelviewMatrixStack.Top->m, + 16 * sizeof(GLfloat)); + memcpy(save->ProjectionMatrix, ctx->ProjectionMatrixStack.Top->m, + 16 * sizeof(GLfloat)); + memcpy(save->TextureMatrix, ctx->TextureMatrixStack[0].Top->m, + 16 * sizeof(GLfloat)); save->MatrixMode = ctx->Transform.MatrixMode; /* set 1:1 vertex:pixel coordinate transform */ _mesa_ActiveTextureARB(GL_TEXTURE0); diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index f37241d..0675bb9 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -511,10 +511,8 @@ fbSwapBuffers( __DRIdrawable *dPriv ) ASSERT(backBuffer); for (i = 0; i < dPriv->h; i++) { - _mesa_memcpy(tmp, (char *) backBuffer + offset, - currentPitch); - _mesa_memcpy((char *) frontBuffer + offset, tmp, - currentPitch); + memcpy(tmp, (char *) backBuffer + offset, currentPitch); + memcpy((char *) frontBuffer + offset, tmp, currentPitch); offset += currentPitch; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c index 1118b96..5906ad6 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c @@ -72,7 +72,7 @@ nouveau_bufferobj_data(GLcontext *ctx, GLenum target, GLsizeiptrARB size, if (data) { nouveau_bo_map(nbo->bo, NOUVEAU_BO_WR); - _mesa_memcpy(nbo->bo->map, data, size); + memcpy(nbo->bo->map, data, size); nouveau_bo_unmap(nbo->bo); } @@ -87,7 +87,7 @@ nouveau_bufferobj_subdata(GLcontext *ctx, GLenum target, GLintptrARB offset, struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj); nouveau_bo_map(nbo->bo, NOUVEAU_BO_WR); - _mesa_memcpy(nbo->bo->map + offset, data, size); + memcpy(nbo->bo->map + offset, data, size); nouveau_bo_unmap(nbo->bo); } @@ -99,7 +99,7 @@ nouveau_bufferobj_get_subdata(GLcontext *ctx, GLenum target, GLintptrARB offset, struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj); nouveau_bo_map(nbo->bo, NOUVEAU_BO_RD); - _mesa_memcpy(data, nbo->bo->map + offset, size); + memcpy(data, nbo->bo->map + offset, size); nouveau_bo_unmap(nbo->bo); } diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c index 3efa0e3..282c0e1 100644 --- a/src/mesa/drivers/dri/r300/r300_draw.c +++ b/src/mesa/drivers/dri/r300/r300_draw.c @@ -177,7 +177,7 @@ static void r300SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer radeon_bo_map(r300->ind_buf.bo, 1); assert(r300->ind_buf.bo->ptr != NULL); dst_ptr = ADD_POINTERS(r300->ind_buf.bo->ptr, r300->ind_buf.bo_offset); - _mesa_memcpy(dst_ptr, src_ptr, size); + memcpy(dst_ptr, src_ptr, size); radeon_bo_unmap(r300->ind_buf.bo); r300->ind_buf.is_32bit = (mesa_ind_buf->type == GL_UNSIGNED_INT); @@ -314,7 +314,7 @@ static void r300AlignDataToDword(GLcontext *ctx, const struct gl_client_array *i int i; for (i = 0; i < count; ++i) { - _mesa_memcpy(dst_ptr, src_ptr, input->StrideB); + memcpy(dst_ptr, src_ptr, input->StrideB); src_ptr += input->StrideB; dst_ptr += dst_stride; } diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 3a8d5fb..efdcdb7 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -235,7 +235,7 @@ static struct r300_vertex_program *build_program(GLcontext *ctx, vp = _mesa_calloc(sizeof(*vp)); vp->Base = _mesa_clone_vertex_program(ctx, mesa_vp); - _mesa_memcpy(&vp->key, wanted_key, sizeof(vp->key)); + memcpy(&vp->key, wanted_key, sizeof(vp->key)); rc_init(&compiler.Base); compiler.Base.Debug = (RADEON_DEBUG & RADEON_VERTS) ? GL_TRUE : GL_FALSE; diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 8f14af7..fdd02fa 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -594,7 +594,7 @@ static void r700AlignDataToDword(GLcontext *ctx, for (i = 0; i < count; ++i) { - _mesa_memcpy(dst_ptr, src_ptr, input->StrideB); + memcpy(dst_ptr, src_ptr, input->StrideB); src_ptr += input->StrideB; dst_ptr += dst_stride; } @@ -855,7 +855,7 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer assert(context->ind_buf.bo->ptr != NULL); dst_ptr = ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - _mesa_memcpy(dst_ptr, src_ptr, size); + memcpy(dst_ptr, src_ptr, size); radeon_bo_unmap(context->ind_buf.bo); context->ind_buf.is_32bit = (mesa_ind_buf->type == GL_UNSIGNED_INT); diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c index 99d3ec7..bc5915d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c +++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c @@ -114,7 +114,7 @@ radeonBufferData(GLcontext * ctx, if (data != NULL) { radeon_bo_map(radeon_obj->bo, GL_TRUE); - _mesa_memcpy(radeon_obj->bo->ptr, data, size); + memcpy(radeon_obj->bo->ptr, data, size); radeon_bo_unmap(radeon_obj->bo); } @@ -145,7 +145,7 @@ radeonBufferSubData(GLcontext * ctx, radeon_bo_map(radeon_obj->bo, GL_TRUE); - _mesa_memcpy(radeon_obj->bo->ptr + offset, data, size); + memcpy(radeon_obj->bo->ptr + offset, data, size); radeon_bo_unmap(radeon_obj->bo); } @@ -165,7 +165,7 @@ radeonGetBufferSubData(GLcontext * ctx, radeon_bo_map(radeon_obj->bo, GL_FALSE); - _mesa_memcpy(data, radeon_obj->bo->ptr + offset, size); + memcpy(data, radeon_obj->bo->ptr + offset, size); radeon_bo_unmap(radeon_obj->bo); } diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c index 917f975..a64f093 100644 --- a/src/mesa/drivers/dri/unichrome/via_tex.c +++ b/src/mesa/drivers/dri/unichrome/via_tex.c @@ -951,11 +951,11 @@ void viaInitTextureFuncs(struct dd_function_table * functions) * Note that this function is currently disabled in via_tris.c too. */ if (getenv("VIA_NO_SSE")) - functions->TextureMemCpy = _mesa_memcpy; + functions->TextureMemCpy = memcpy; else functions->TextureMemCpy = via_sse_memcpy; #else - functions->TextureMemCpy = _mesa_memcpy; + functions->TextureMemCpy = memcpy; #endif functions->UpdateTexturePalette = 0; diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c index 51bd235..4900251 100644 --- a/src/mesa/drivers/fbdev/glfbdev.c +++ b/src/mesa/drivers/fbdev/glfbdev.c @@ -742,7 +742,7 @@ glFBDevSwapBuffers( GLFBDevBufferPtr buffer ) ASSERT(frontrb->Base.Data); ASSERT(backrb->Base.Data); - _mesa_memcpy(frontrb->Base.Data, backrb->Base.Data, buffer->size); + memcpy(frontrb->Base.Data, backrb->Base.Data, buffer->size); } diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def index 10e4c4a..f82db88 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_memcpy _mesa_memset _mesa_new_array_object _mesa_new_framebuffer diff --git a/src/mesa/drivers/windows/icd/mesa.def b/src/mesa/drivers/windows/icd/mesa.def index c4b9bff..06c384d 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_memcpy _mesa_memset _mesa_new_buffer_object _mesa_new_texture_object diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 075b9a1..291e90c 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1383,7 +1383,7 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list ) /* create a new vishandle - the cached one may be stale */ xmvis->vishandle = (XVisualInfo *) _mesa_malloc(sizeof(XVisualInfo)); if (xmvis->vishandle) { - _mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); + memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); } return xmvis->vishandle; #endif @@ -2162,7 +2162,7 @@ Fake_glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) /* create a new vishandle - the cached one may be stale */ xmvis->vishandle = (XVisualInfo *) _mesa_malloc(sizeof(XVisualInfo)); if (xmvis->vishandle) { - _mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); + memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); } return xmvis->vishandle; #endif diff --git a/src/mesa/glapi/mesadef.py b/src/mesa/glapi/mesadef.py index 8df0414..c7e2c08 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_memcpy' print '\t_mesa_memset' print '\t_mesa_new_buffer_object' print '\t_mesa_new_texture_object' diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 3fbdba2..881644c 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -432,7 +432,7 @@ _mesa_PushAttrib(GLbitfield mask) _mesa_lock_context_textures(ctx); /* copy/save the bulk of texture state here */ - _mesa_memcpy(&texstate->Texture, &ctx->Texture, sizeof(ctx->Texture)); + memcpy(&texstate->Texture, &ctx->Texture, sizeof(ctx->Texture)); /* Save references to the currently bound texture objects so they don't * accidentally get deleted while referenced in the attribute stack. diff --git a/src/mesa/main/bitset.h b/src/mesa/main/bitset.h index f2709ab..5463c0a 100644 --- a/src/mesa/main/bitset.h +++ b/src/mesa/main/bitset.h @@ -47,7 +47,7 @@ /* bitset operations */ -#define BITSET_COPY(x, y) _mesa_memcpy( (x), (y), sizeof (x) ) +#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) ) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index dabb138..c735661 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -339,7 +339,7 @@ _mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size, bufObj->Usage = usage; if (data) { - _mesa_memcpy( bufObj->Data, data, size ); + memcpy( bufObj->Data, data, size ); } return GL_TRUE; @@ -378,7 +378,7 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, ASSERT(size + offset <= bufObj->Size); if (bufObj->Data) { - _mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size ); + memcpy( (GLubyte *) bufObj->Data + offset, data, size ); } } @@ -408,7 +408,7 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, (void) ctx; (void) target; if (bufObj->Data && ((GLsizeiptrARB) (size + offset) <= bufObj->Size)) { - _mesa_memcpy( data, (GLubyte *) bufObj->Data + offset, size ); + memcpy( data, (GLubyte *) bufObj->Data + offset, size ); } } @@ -530,7 +530,7 @@ _mesa_copy_buffer_subdata(GLcontext *ctx, GL_WRITE_ONLY, dst); if (srcPtr && dstPtr) - _mesa_memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); + memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); ctx->Driver.UnmapBuffer(ctx, GL_COPY_READ_BUFFER, src); ctx->Driver.UnmapBuffer(ctx, GL_COPY_WRITE_BUFFER, dst); diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index 5ede76c..1c12fb0 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -684,7 +684,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, } break; case GL_RGBA: - _mesa_memcpy(rgba, table->TableF, 4 * table->Size * sizeof(GLfloat)); + memcpy(rgba, table->TableF, 4 * table->Size * sizeof(GLfloat)); break; default: _mesa_problem(ctx, "bad table format in glGetColorTable"); diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 683d062..ea0d13b 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -4793,7 +4793,7 @@ save_LoadProgramNV(GLenum target, GLuint id, GLsizei len, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); return; } - _mesa_memcpy(programCopy, program, len); + memcpy(programCopy, program, len); n[1].e = target; n[2].ui = id; n[3].i = len; @@ -4820,7 +4820,7 @@ save_RequestResidentProgramsNV(GLsizei num, const GLuint * ids) _mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV"); return; } - _mesa_memcpy(idCopy, ids, num * sizeof(GLuint)); + memcpy(idCopy, ids, num * sizeof(GLuint)); n[1].i = num; n[2].data = idCopy; } @@ -4991,7 +4991,7 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV"); return; } - _mesa_memcpy(nameCopy, name, len); + memcpy(nameCopy, name, len); n[1].ui = id; n[2].i = len; n[3].data = nameCopy; @@ -5090,7 +5090,7 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); return; } - _mesa_memcpy(programCopy, string, len); + memcpy(programCopy, string, len); n[1].e = target; n[2].e = format; n[3].i = len; @@ -6201,7 +6201,7 @@ memdup(const void *src, GLsizei bytes) { void *b = bytes >= 0 ? _mesa_malloc(bytes) : NULL; if (b) - _mesa_memcpy(b, src, bytes); + memcpy(b, src, bytes); return b; } diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 9b0b5f0..f24baf5 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -579,9 +579,9 @@ append(const char *a, const char *b) char *s = _mesa_calloc(aLen + bLen + 1); if (s) { if (a) - _mesa_memcpy(s, a, aLen); + memcpy(s, a, aLen); if (b) - _mesa_memcpy(s + aLen, b, bLen); + memcpy(s + aLen, b, bLen); s[aLen + bLen] = '\0'; } if (a) @@ -694,7 +694,7 @@ _mesa_make_extension_string( GLcontext *ctx ) for (i = 0 ; i < Elements(default_extensions) ; i++) { if (extension_enabled(ctx, i)) { GLuint len = (GLuint) strlen(default_extensions[i].name); - _mesa_memcpy(s + extStrLen, default_extensions[i].name, len); + memcpy(s + extStrLen, default_extensions[i].name, len); extStrLen += len; s[extStrLen] = ' '; extStrLen++; diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 468f2a9..bd03217 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1099,7 +1099,7 @@ _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels, } if ((packing->SkipPixels & 7) == 0) { - _mesa_memcpy( dst, src, width_in_bytes ); + memcpy( dst, src, width_in_bytes ); if (packing->LsbFirst) { flip_bytes( dst, width_in_bytes ); } @@ -1191,7 +1191,7 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source, return; if ((packing->SkipPixels & 7) == 0) { - _mesa_memcpy( dst, src, width_in_bytes ); + memcpy( dst, src, width_in_bytes ); if (packing->LsbFirst) { flip_bytes( dst, width_in_bytes ); } @@ -3794,7 +3794,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, if (srcType == CHAN_TYPE) { if (dstFormat == GL_RGBA) { if (srcFormat == GL_RGBA) { - _mesa_memcpy( dest, source, n * 4 * sizeof(GLchan) ); + memcpy( dest, source, n * 4 * sizeof(GLchan) ); return; } else if (srcFormat == GL_RGB) { @@ -3814,7 +3814,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, } else if (dstFormat == GL_RGB) { if (srcFormat == GL_RGB) { - _mesa_memcpy( dest, source, n * 3 * sizeof(GLchan) ); + memcpy( dest, source, n * 3 * sizeof(GLchan) ); return; } else if (srcFormat == GL_RGBA) { @@ -3834,7 +3834,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, else if (dstFormat == srcFormat) { GLint comps = _mesa_components_in_format(srcFormat); assert(comps > 0); - _mesa_memcpy( dest, source, n * comps * sizeof(GLchan) ); + memcpy( dest, source, n * comps * sizeof(GLchan) ); return; } } @@ -4381,11 +4381,11 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, */ if (transferOps == 0 && srcType == GL_UNSIGNED_BYTE && dstType == GL_UNSIGNED_BYTE) { - _mesa_memcpy(dest, source, n * sizeof(GLubyte)); + memcpy(dest, source, n * sizeof(GLubyte)); } else if (transferOps == 0 && srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) { - _mesa_memcpy(dest, source, n * sizeof(GLuint)); + memcpy(dest, source, n * sizeof(GLuint)); } else { /* @@ -4421,7 +4421,7 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, } break; case GL_UNSIGNED_INT: - _mesa_memcpy(dest, indexes, n * sizeof(GLuint)); + memcpy(dest, indexes, n * sizeof(GLuint)); break; default: _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span"); @@ -4444,7 +4444,7 @@ _mesa_pack_index_span( const GLcontext *ctx, GLuint n, if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) { /* make a copy of input */ - _mesa_memcpy(indexes, source, n * sizeof(GLuint)); + memcpy(indexes, source, n * sizeof(GLuint)); _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes); source = indexes; } @@ -4592,14 +4592,14 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, !ctx->Pixel.MapStencilFlag && srcType == GL_UNSIGNED_BYTE && dstType == GL_UNSIGNED_BYTE) { - _mesa_memcpy(dest, source, n * sizeof(GLubyte)); + memcpy(dest, source, n * sizeof(GLubyte)); } else if (transferOps == 0 && !ctx->Pixel.MapStencilFlag && srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) { - _mesa_memcpy(dest, source, n * sizeof(GLuint)); + memcpy(dest, source, n * sizeof(GLuint)); } else { /* @@ -4646,7 +4646,7 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, } break; case GL_UNSIGNED_INT: - _mesa_memcpy(dest, indexes, n * sizeof(GLuint)); + memcpy(dest, indexes, n * sizeof(GLuint)); break; default: _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span"); @@ -4667,7 +4667,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset || ctx->Pixel.MapStencilFlag) { /* make a copy of input */ - _mesa_memcpy(stencil, source, n * sizeof(GLstencil)); + memcpy(stencil, source, n * sizeof(GLstencil)); _mesa_apply_stencil_transfer_ops(ctx, n, stencil); source = stencil; } @@ -4675,7 +4675,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, switch (dstType) { case GL_UNSIGNED_BYTE: if (sizeof(GLstencil) == 1) { - _mesa_memcpy( dest, source, n ); + memcpy( dest, source, n ); } else { GLubyte *dst = (GLubyte *) dest; @@ -5039,7 +5039,7 @@ _mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, ASSERT(n <= MAX_WIDTH); if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) { - _mesa_memcpy(depthCopy, depthSpan, n * sizeof(GLfloat)); + memcpy(depthCopy, depthSpan, n * sizeof(GLfloat)); _mesa_scale_and_bias_depth(ctx, n, depthCopy); depthSpan = depthCopy; } @@ -5158,7 +5158,7 @@ _mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest, ASSERT(n <= MAX_WIDTH); if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) { - _mesa_memcpy(depthCopy, depthVals, n * sizeof(GLfloat)); + memcpy(depthCopy, depthVals, n * sizeof(GLfloat)); _mesa_scale_and_bias_depth(ctx, n, depthCopy); depthVals = depthCopy; } @@ -5166,7 +5166,7 @@ _mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest, if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset || ctx->Pixel.MapStencilFlag) { - _mesa_memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil)); + memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil)); _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy); stencilVals = stencilCopy; } @@ -5303,7 +5303,7 @@ _mesa_unpack_image( GLuint dimensions, } } else { - _mesa_memcpy(dst, src, bytesPerRow); + memcpy(dst, src, bytesPerRow); } /* byte flipping/swapping */ @@ -5356,7 +5356,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); } else { const GLubyte (*src1)[4] = (const GLubyte (*)[4]) src; @@ -5372,7 +5372,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); } break; case GL_UNSIGNED_SHORT: @@ -5389,7 +5389,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); } else { const GLushort (*src2)[4] = (const GLushort (*)[4]) src; @@ -5405,7 +5405,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); } break; case GL_FLOAT: @@ -5422,7 +5422,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); } else { const GLfloat (*src4)[4] = (const GLfloat (*)[4]) src; @@ -5438,7 +5438,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); } break; default: diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 2a0952c..0abdfca 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -221,7 +221,7 @@ _mesa_align_realloc(void *oldBuffer, size_t oldSize, size_t newSize, const size_t copySize = (oldSize < newSize) ? oldSize : newSize; void *newBuf = _mesa_align_malloc(newSize, alignment); if (newBuf && oldBuffer && copySize > 0) { - _mesa_memcpy(newBuf, oldBuffer, copySize); + memcpy(newBuf, oldBuffer, copySize); } if (oldBuffer) _mesa_align_free(oldBuffer); @@ -238,23 +238,12 @@ _mesa_realloc(void *oldBuffer, size_t oldSize, size_t newSize) const size_t copySize = (oldSize < newSize) ? oldSize : newSize; void *newBuffer = _mesa_malloc(newSize); if (newBuffer && oldBuffer && copySize > 0) - _mesa_memcpy(newBuffer, oldBuffer, copySize); + memcpy(newBuffer, oldBuffer, copySize); if (oldBuffer) _mesa_free(oldBuffer); return newBuffer; } -/** memcpy wrapper */ -void * -_mesa_memcpy(void *dest, const void *src, size_t n) -{ -#if defined(SUNOS4) - return memcpy((char *) dest, (char *) src, (int) n); -#else - return memcpy(dest, src, n); -#endif -} - /** Wrapper around memset() */ void _mesa_memset( void *dst, int val, size_t n ) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 1246421..8f13d51 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -72,7 +72,7 @@ extern "C" { #define ALIGN_FREE(PTR) _mesa_align_free(PTR) /** Copy \p BYTES bytes from \p SRC into \p DST */ -#define MEMCPY( DST, SRC, BYTES) _mesa_memcpy(DST, SRC, BYTES) +#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) @@ -543,9 +543,6 @@ _mesa_exec_free( void *addr ); extern void * _mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize ); -extern void * -_mesa_memcpy( void *dest, const void *src, size_t n ); - extern void _mesa_memset( void *dst, int val, size_t n ); diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index 38a97fd..a862457 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -207,7 +207,7 @@ do { \ */ #define COPY_4FV( DST, SRC ) \ do { \ - _mesa_memcpy(DST, SRC, sizeof(GLfloat) * 4); \ + memcpy(DST, SRC, sizeof(GLfloat) * 4); \ } while (0) /** Copy \p SZ elements into a 4-element vector */ diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 3bb062b..4ae5843 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -87,7 +87,7 @@ get_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, { const GLubyte *src = (const GLubyte *) rb->Data + y * rb->Width + x; ASSERT(rb->DataType == GL_UNSIGNED_BYTE); - _mesa_memcpy(values, src, count * sizeof(GLubyte)); + memcpy(values, src, count * sizeof(GLubyte)); } @@ -121,7 +121,7 @@ put_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, values, count * sizeof(GLubyte)); + memcpy(dst, values, count * sizeof(GLubyte)); } } @@ -207,7 +207,7 @@ get_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, { const void *src = rb->GetPointer(ctx, rb, x, y); ASSERT(rb->DataType == GL_UNSIGNED_SHORT); - _mesa_memcpy(values, src, count * sizeof(GLushort)); + memcpy(values, src, count * sizeof(GLushort)); } @@ -241,7 +241,7 @@ put_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, count * sizeof(GLushort)); + memcpy(dst, src, count * sizeof(GLushort)); } } @@ -337,7 +337,7 @@ get_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, const void *src = rb->GetPointer(ctx, rb, x, y); ASSERT(rb->DataType == GL_UNSIGNED_INT || rb->DataType == GL_UNSIGNED_INT_24_8_EXT); - _mesa_memcpy(values, src, count * sizeof(GLuint)); + memcpy(values, src, count * sizeof(GLuint)); } @@ -373,7 +373,7 @@ put_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, count * sizeof(GLuint)); + memcpy(dst, src, count * sizeof(GLuint)); } } @@ -631,7 +631,7 @@ get_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, const GLubyte *src = (const GLubyte *) rb->Data + 4 * (y * rb->Width + x); ASSERT(rb->DataType == GL_UNSIGNED_BYTE); ASSERT(rb->Format == MESA_FORMAT_RGBA8888); - _mesa_memcpy(values, src, 4 * count * sizeof(GLubyte)); + memcpy(values, src, 4 * count * sizeof(GLubyte)); } @@ -669,7 +669,7 @@ put_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, 4 * count * sizeof(GLubyte)); + memcpy(dst, src, 4 * count * sizeof(GLubyte)); } } @@ -788,7 +788,7 @@ get_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, { const GLshort *src = (const GLshort *) rb->Data + 4 * (y * rb->Width + x); ASSERT(rb->DataType == GL_UNSIGNED_SHORT || rb->DataType == GL_SHORT); - _mesa_memcpy(values, src, 4 * count * sizeof(GLshort)); + memcpy(values, src, 4 * count * sizeof(GLshort)); } @@ -826,7 +826,7 @@ put_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, 4 * count * sizeof(GLushort)); + memcpy(dst, src, 4 * count * sizeof(GLushort)); } } @@ -851,7 +851,7 @@ put_row_rgb_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, 4 * count * sizeof(GLushort)); + memcpy(dst, src, 4 * count * sizeof(GLushort)); } } @@ -1374,7 +1374,7 @@ copy_buffer_alpha8(struct gl_renderbuffer* dst, struct gl_renderbuffer* src) ASSERT(dst->Width == src->Width); ASSERT(dst->Height == src->Height); - _mesa_memcpy(dst->Data, src->Data, dst->Width * dst->Height * sizeof(GLubyte)); + memcpy(dst->Data, src->Data, dst->Width * dst->Height * sizeof(GLubyte)); } diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index b9c84eb..91f2a7a 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -469,8 +469,8 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, for (i = 0; i < count; i++) { GLint start = (i > 0) ? offsets[i - 1] : 0; - _mesa_memcpy(source + start, string[i], - (offsets[i] - start) * sizeof(GLcharARB)); + memcpy(source + start, string[i], + (offsets[i] - start) * sizeof(GLcharARB)); } source[totalLength - 1] = '\0'; source[totalLength - 2] = '\0'; diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index ac3f9eb..36b48fd 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -398,7 +398,7 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, if (size > 0) { const GLsizei copy_count = MIN2(size, bufSize); - _mesa_memcpy(values, v, sizeof(GLint) * copy_count); + memcpy(values, v, sizeof(GLint) * copy_count); } if (length != NULL) { diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 6b3355a..7ad9180 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -156,7 +156,7 @@ get_tex_depth_stencil(GLcontext *ctx, GLuint dimensions, void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, width, height, format, type, img, row, 0); - _mesa_memcpy(dest, src, width * sizeof(GLuint)); + memcpy(dest, src, width * sizeof(GLuint)); if (ctx->Pack.SwapBytes) { _mesa_swap4((GLuint *) dest, width); } @@ -187,7 +187,7 @@ get_tex_ycbcr(GLcontext *ctx, GLuint dimensions, void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, width, height, format, type, img, row, 0); - _mesa_memcpy(dest, src, width * sizeof(GLushort)); + memcpy(dest, src, width * sizeof(GLushort)); /* check for byte swapping */ if ((texImage->TexFormat == MESA_FORMAT_YCBCR @@ -560,7 +560,7 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, texImage->Width, texImage->Height, texImage->Depth); - _mesa_memcpy(img, texImage->Data, size); + memcpy(img, texImage->Data, size); } else { GLuint bw, bh; diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 78612b0..c1418e0 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -2919,7 +2919,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS) + dstYoffset * dstRowStride + dstXoffset * texelBytes; for (row = 0; row < srcHeight; row++) { - _mesa_memcpy(dstRow, srcRow, bytesPerRow); + memcpy(dstRow, srcRow, bytesPerRow); dstRow += dstRowStride; srcRow += srcWidth * components; } diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index a77ff7c..75b4274 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -1091,7 +1091,7 @@ _mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string) } if (prog->String) - _mesa_memcpy(dst, prog->String, strlen((char *) prog->String)); + memcpy(dst, prog->String, strlen((char *) prog->String)); else *dst = '\0'; } diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index ff3a921..e226973 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -1233,7 +1233,7 @@ Parse_PrintInstruction(struct parse_state *parseState, parseState->pos += len + 1; msg = (GLubyte*) _mesa_malloc(len + 1); - _mesa_memcpy(msg, str, len); + memcpy(msg, str, len); msg[len] = 0; inst->Data = msg; diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index 630de7c..1a840a3 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -1050,7 +1050,7 @@ Parse_PrintInstruction(struct parse_state *parseState, struct prog_instruction * parseState->pos += len + 1; msg = (GLubyte*) _mesa_malloc(len + 1); - _mesa_memcpy(msg, str, len); + memcpy(msg, str, len); msg[len] = 0; inst->Data = msg; diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index 44c9619..dcf834f 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -110,7 +110,7 @@ _mesa_copy_instructions(struct prog_instruction *dest, const struct prog_instruction *src, GLuint n) { GLuint i; - _mesa_memcpy(dest, src, n * sizeof(struct prog_instruction)); + memcpy(dest, src, n * sizeof(struct prog_instruction)); for (i = 0; i < n; i++) { if (src[i].Comment) dest[i].Comment = _mesa_strdup(src[i].Comment); diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 18ef6d5..3bf9a65 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -223,7 +223,7 @@ _mesa_find_line_column(const GLubyte *string, const GLubyte *pos, p++; len = p - lineStart; s = (GLubyte *) _mesa_malloc(len + 1); - _mesa_memcpy(s, lineStart, len); + memcpy(s, lineStart, len); s[len] = 0; return s; diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index 2adfb40..182ef4c 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -5623,7 +5623,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); return GL_FALSE; } - _mesa_memcpy (strz, str, len); + memcpy (strz, str, len); strz[len] = '\0'; state->prog->String = strz; diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 3880d54..577bd2c 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -2662,7 +2662,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); return GL_FALSE; } - _mesa_memcpy (strz, str, len); + memcpy (strz, str, len); strz[len] = '\0'; state->prog->String = strz; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 44310d2..7e2a60f 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1380,7 +1380,7 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) GLchar *newName = _mesa_malloc(len + 1); if (!newName) return -1; /* out of mem */ - _mesa_memcpy(newName, name, len); + memcpy(newName, name, len); newName[len] = 0; location = _mesa_lookup_uniform(shProg->Uniforms, newName); diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 3a15d9d..5441d60 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -269,10 +269,10 @@ slang_operation_insert(GLuint *numElements, slang_operation **array, slang_operation *newOp; newOp = ops + pos; if (pos > 0) - _mesa_memcpy(ops, *array, pos * sizeof(slang_operation)); + memcpy(ops, *array, pos * sizeof(slang_operation)); if (pos < *numElements) - _mesa_memcpy(newOp + 1, (*array) + pos, - (*numElements - pos) * sizeof(slang_operation)); + memcpy(newOp + 1, (*array) + pos, + (*numElements - pos) * sizeof(slang_operation)); if (!slang_operation_construct(newOp)) { _slang_free(ops); diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 2906cb1..68129d4 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -625,7 +625,7 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType) for (i = 0; i < shProg->NumShaders; i++) { const struct gl_shader *shader = shProg->Shaders[i]; if (shader->Type == shaderType) { - _mesa_memcpy(source + len, shader->Source, shaderLengths[i]); + memcpy(source + len, shader->Source, shaderLengths[i]); len += shaderLengths[i]; } } diff --git a/src/mesa/shader/slang/slang_mem.c b/src/mesa/shader/slang/slang_mem.c index c37e12f..54f5196 100644 --- a/src/mesa/shader/slang/slang_mem.c +++ b/src/mesa/shader/slang/slang_mem.c @@ -197,7 +197,7 @@ _slang_realloc(void *oldBuffer, GLuint oldSize, GLuint newSize) ASSERT(is_valid_address(pool, oldBuffer)); if (newBuffer && oldBuffer && copySize > 0) - _mesa_memcpy(newBuffer, oldBuffer, copySize); + memcpy(newBuffer, oldBuffer, copySize); return newBuffer; } diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index e3b0491..56a33e6 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -92,7 +92,7 @@ slang_string_push (slang_string *self, const slang_string *str) return; } if (grow (self, self->length + str->length)) { - _mesa_memcpy (&self->data[self->length], str->data, str->length); + memcpy (&self->data[self->length], str->data, str->length); self->length += str->length; } } @@ -110,7 +110,7 @@ GLvoid slang_string_pushs (slang_string *self, const char *cstr, GLuint len) { if (grow (self, self->length + len)) { - _mesa_memcpy (&self->data[self->length], cstr, len); + memcpy (&self->data[self->length], cstr, len); self->length += len; } } diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c index f1b4f11..c92af34 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -377,7 +377,7 @@ st_copy_buffer_subdata(GLcontext *ctx, PIPE_BUFFER_USAGE_CPU_WRITE); if (srcPtr && dstPtr) - _mesa_memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); + memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); pipe_buffer_unmap(pipe->screen, srcObj->buffer); pipe_buffer_unmap(pipe->screen, dstObj->buffer); diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index 95c8343..5b090c7 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -89,7 +89,7 @@ blend_noop(GLcontext *ctx, GLuint n, const GLubyte mask[], else bytes = 4 * n * sizeof(GLfloat); - _mesa_memcpy(src, dst, bytes); + memcpy(src, dst, bytes); } diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index e881d1b..b69be50 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -167,7 +167,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL0]; /* copy convolved colors into span array */ - _mesa_memcpy(rgba, src, width * 4 * sizeof(GLfloat)); + memcpy(rgba, src, width * 4 * sizeof(GLfloat)); /* write span */ span.x = destx; @@ -273,7 +273,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, /* Get row/span of source pixels */ if (overlapping) { /* get from buffered image */ - _mesa_memcpy(rgba, p, width * sizeof(GLfloat) * 4); + memcpy(rgba, p, width * sizeof(GLfloat) * 4); p += width * 4; } else { @@ -374,7 +374,7 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy, for (j = 0; j < height; j++, sy += stepy, dy += stepy) { /* Get color indexes */ if (overlapping) { - _mesa_memcpy(span.array->index, p, width * sizeof(GLuint)); + memcpy(span.array->index, p, width * sizeof(GLuint)); p += width; } else { @@ -508,7 +508,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLfloat depth[MAX_WIDTH]; /* get depth values */ if (overlapping) { - _mesa_memcpy(depth, p, width * sizeof(GLfloat)); + memcpy(depth, p, width * sizeof(GLfloat)); p += width; } else { @@ -606,7 +606,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, /* Get stencil values */ if (overlapping) { - _mesa_memcpy(stencil, p, width * sizeof(GLstencil)); + memcpy(stencil, p, width * sizeof(GLstencil)); p += width; } else { @@ -730,7 +730,7 @@ copy_depth_stencil_pixels(GLcontext *ctx, /* Get stencil values */ if (overlapping) { - _mesa_memcpy(stencil, stencilPtr, width * sizeof(GLstencil)); + memcpy(stencil, stencilPtr, width * sizeof(GLstencil)); stencilPtr += width; } else { @@ -759,7 +759,7 @@ copy_depth_stencil_pixels(GLcontext *ctx, /* get depth values */ if (overlapping) { - _mesa_memcpy(depth, depthPtr, width * sizeof(GLfloat)); + memcpy(depth, depthPtr, width * sizeof(GLfloat)); depthPtr += width; } else { diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 248d6cc..136c296 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -473,7 +473,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, _mesa_image_address2d(unpack, pixels, width, height, GL_DEPTH_COMPONENT, type, row, 0); if (shift == 0) { - _mesa_memcpy(span.array->z, zSrc, width * sizeof(GLuint)); + memcpy(span.array->z, zSrc, width * sizeof(GLuint)); } else { GLint col; diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 85d30cc..63a8d4e 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -993,8 +993,8 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span) if (numBuffers > 1) { /* save indexes for second, third renderbuffer writes */ - _mesa_memcpy(indexSave, span->array->index, - span->end * sizeof(indexSave[0])); + memcpy(indexSave, span->array->index, + span->end * sizeof(indexSave[0])); } if (ctx->Color.IndexLogicOpEnabled) { @@ -1073,8 +1073,8 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span) if (buf + 1 < numBuffers) { /* restore original span values */ - _mesa_memcpy(span->array->index, indexSave, - span->end * sizeof(indexSave[0])); + memcpy(span->array->index, indexSave, + span->end * sizeof(indexSave[0])); } } /* for buf */ } @@ -1510,8 +1510,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (!multiFragOutputs && numBuffers > 1) { /* save colors for second, third renderbuffer writes */ - _mesa_memcpy(rgbaSave, span->array->rgba, - 4 * span->end * sizeof(GLchan)); + memcpy(rgbaSave, span->array->rgba, + 4 * span->end * sizeof(GLchan)); } ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB); @@ -1544,8 +1544,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (!multiFragOutputs && numBuffers > 1) { /* restore original span values */ - _mesa_memcpy(span->array->rgba, rgbaSave, - 4 * span->end * sizeof(GLchan)); + memcpy(span->array->rgba, rgbaSave, + 4 * span->end * sizeof(GLchan)); } } /* if rb */ diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index e9e9d3a..5e9a4e3 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -475,7 +475,7 @@ stencil_and_ztest_span(GLcontext *ctx, SWspan *span, GLuint face) GLubyte passMask[MAX_WIDTH], failMask[MAX_WIDTH], origMask[MAX_WIDTH]; /* save the current mask bits */ - _mesa_memcpy(origMask, mask, n * sizeof(GLubyte)); + memcpy(origMask, mask, n * sizeof(GLubyte)); /* apply the depth test */ _swrast_depth_test_span(ctx, span); @@ -918,7 +918,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face ) ASSERT(rb->DataType == GL_UNSIGNED_BYTE); _swrast_get_values(ctx, rb, n, x, y, stencil, sizeof(GLubyte)); - _mesa_memcpy(origMask, mask, n * sizeof(GLubyte)); + memcpy(origMask, mask, n * sizeof(GLubyte)); (void) do_stencil_test(ctx, face, n, stencil, mask); @@ -928,7 +928,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face ) } else { GLubyte tmpMask[MAX_WIDTH]; - _mesa_memcpy(tmpMask, mask, n * sizeof(GLubyte)); + memcpy(tmpMask, mask, n * sizeof(GLubyte)); _swrast_depth_test_span(ctx, span); @@ -962,7 +962,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face ) ctx->Stencil.ZPassFunc[face], face, mask); } else { - _mesa_memcpy(origMask, mask, n * sizeof(GLubyte)); + memcpy(origMask, mask, n * sizeof(GLubyte)); _swrast_depth_test_span(ctx, span); diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index d395587..2b8c962 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -236,7 +236,7 @@ void _tnl_get_attr( GLcontext *ctx, const void *vin, dest[0] = ctx->Point.Size; } else { - _mesa_memcpy( dest, ctx->Current.Attrib[attr], 4*sizeof(GLfloat)); + memcpy( dest, ctx->Current.Attrib[attr], 4*sizeof(GLfloat)); } } diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c index 99ddace..b1ea142 100644 --- a/src/mesa/tnl/t_vertex_generic.c +++ b/src/mesa/tnl/t_vertex_generic.c @@ -1074,9 +1074,9 @@ void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ) if (a[j].attrib == VERT_ATTRIB_COLOR0 || a[j].attrib == VERT_ATTRIB_COLOR1) { - _mesa_memcpy( vdst + a[j].vertoffset, - vsrc + a[j].vertoffset, - a[j].vertattrsize ); + memcpy( vdst + a[j].vertoffset, + vsrc + a[j].vertoffset, + a[j].vertattrsize ); } } } diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 8ee14be..b10ee21 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -126,8 +126,8 @@ void vbo_exec_vtx_wrap( struct vbo_exec_context *exec ) assert(exec->vtx.max_vert - exec->vtx.vert_count > exec->vtx.copied.nr); for (i = 0 ; i < exec->vtx.copied.nr ; i++) { - _mesa_memcpy( exec->vtx.buffer_ptr, data, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.buffer_ptr, data, + exec->vtx.vertex_size * sizeof(GLfloat)); exec->vtx.buffer_ptr += exec->vtx.vertex_size; data += exec->vtx.vertex_size; exec->vtx.vert_count++; @@ -414,13 +414,13 @@ static void GLAPIENTRY vbo_exec_EvalCoord1f( GLfloat u ) } - _mesa_memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, + exec->vtx.vertex_size * sizeof(GLfloat)); vbo_exec_do_EvalCoord1f( exec, u ); - _mesa_memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, + exec->vtx.vertex_size * sizeof(GLfloat)); } static void GLAPIENTRY vbo_exec_EvalCoord2f( GLfloat u, GLfloat v ) @@ -444,13 +444,13 @@ static void GLAPIENTRY vbo_exec_EvalCoord2f( GLfloat u, GLfloat v ) vbo_exec_fixup_vertex( ctx, VBO_ATTRIB_NORMAL, 3 ); } - _mesa_memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, + exec->vtx.vertex_size * sizeof(GLfloat)); vbo_exec_do_EvalCoord2f( exec, u, v ); - _mesa_memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, + exec->vtx.vertex_size * sizeof(GLfloat)); } static void GLAPIENTRY vbo_exec_EvalCoord1fv( const GLfloat *u ) diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index d7dbbce..526bf7a 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -85,24 +85,24 @@ vbo_copy_vertices( struct vbo_exec_context *exec ) case GL_LINES: ovf = nr&1; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case GL_TRIANGLES: ovf = nr%3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case GL_QUADS: ovf = nr&3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case GL_LINE_STRIP: if (nr == 0) { return 0; } else { - _mesa_memcpy( dst, src+(nr-1)*sz, sz * sizeof(GLfloat) ); + memcpy( dst, src+(nr-1)*sz, sz * sizeof(GLfloat) ); return 1; } case GL_LINE_LOOP: @@ -112,12 +112,12 @@ vbo_copy_vertices( struct vbo_exec_context *exec ) return 0; } else if (nr == 1) { - _mesa_memcpy( dst, src+0, sz * sizeof(GLfloat) ); + memcpy( dst, src+0, sz * sizeof(GLfloat) ); return 1; } else { - _mesa_memcpy( dst, src+0, sz * sizeof(GLfloat) ); - _mesa_memcpy( dst+sz, src+(nr-1)*sz, sz * sizeof(GLfloat) ); + memcpy( dst, src+0, sz * sizeof(GLfloat) ); + memcpy( dst+sz, src+(nr-1)*sz, sz * sizeof(GLfloat) ); return 2; } case GL_TRIANGLE_STRIP: @@ -139,7 +139,7 @@ vbo_copy_vertices( struct vbo_exec_context *exec ) break; } for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case PRIM_OUTSIDE_BEGIN_END: return 0; diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 3f86c68..e1caa6f 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -118,23 +118,23 @@ static GLuint _save_copy_vertices( GLcontext *ctx, case GL_LINES: ovf = nr&1; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); return i; case GL_TRIANGLES: ovf = nr%3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); return i; case GL_QUADS: ovf = nr&3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); return i; case GL_LINE_STRIP: if (nr == 0) return 0; else { - _mesa_memcpy( dst, src+(nr-1)*sz, sz*sizeof(GLfloat) ); + memcpy( dst, src+(nr-1)*sz, sz*sizeof(GLfloat) ); return 1; } case GL_LINE_LOOP: @@ -143,11 +143,11 @@ static GLuint _save_copy_vertices( GLcontext *ctx, if (nr == 0) return 0; else if (nr == 1) { - _mesa_memcpy( dst, src+0, sz*sizeof(GLfloat) ); + memcpy( dst, src+0, sz*sizeof(GLfloat) ); return 1; } else { - _mesa_memcpy( dst... [truncated message content] |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:52
|
This may break the SUNOS4 build, but it's no longer relevant. --- src/glx/glcontextmodes.c | 7 ++----- src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 +- src/mesa/drivers/windows/gdi/mesa.def | 1 - src/mesa/drivers/windows/icd/mesa.def | 1 - src/mesa/drivers/x11/xm_dd.c | 2 +- src/mesa/glapi/mesadef.py | 1 - src/mesa/main/bitset.h | 4 ++-- src/mesa/main/ffvertex_prog.c | 2 +- src/mesa/main/imports.c | 11 ----------- src/mesa/main/imports.h | 5 +---- src/mesa/main/renderbuffer.c | 4 ++-- src/mesa/main/texcompress_fxt1.c | 4 ++-- src/mesa/main/texenvprogram.c | 2 +- src/mesa/shader/atifragshader.c | 2 +- src/mesa/shader/prog_cache.c | 2 +- src/mesa/shader/prog_parameter.c | 4 ++-- src/mesa/shader/program.c | 2 +- src/mesa/swrast/s_depth.c | 2 +- src/mesa/swrast/s_span.c | 4 ++-- src/mesa/swrast/s_stencil.c | 4 ++-- src/mesa/tnl/t_vertex_sse.c | 2 +- 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 232031c..257087a 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 0ecbef1..4f477cf 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 87387b1..c232cd2 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 f82db88..d7d6cfa 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 06c384d..f6bd2aa 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 df04e3a..d70236c 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 c7e2c08..59cea59 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 5463c0a..29468e8 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 867a552..48edec6 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 0abdfca..d8375bf 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 8f13d51..68d2043 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 4ae5843..bb0c783 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 85becb8..73a31a1 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 5cc5fda..35a2ceb 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 3e26c43..fb2fa4b 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 9437e59..8e54f3a 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 435e6ce..1feb7bd 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 3bf9a65..2410ccb 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 ac5dae2..36c8db2 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 63a8d4e..7087f25 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 5e9a4e3..aa74b21 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 7a255d6..6436cbf 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 4d70196..0427590 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 */ -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:50
|
--- src/gallium/state_trackers/glx/xlib/glx_api.c | 4 ++-- src/mesa/drivers/x11/fakeglx.c | 4 ++-- src/mesa/main/imports.c | 9 +-------- src/mesa/main/imports.h | 3 --- src/mesa/shader/nvfragparse.c | 6 +++--- src/mesa/shader/nvvertparse.c | 10 +++++----- src/mesa/shader/shader_api.c | 2 +- 7 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index 971b6e7..e3b52f5 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -280,7 +280,7 @@ default_depth_bits(void) int zBits; const char *zEnv = _mesa_getenv("MESA_GLX_DEPTH_BITS"); if (zEnv) - zBits = _mesa_atoi(zEnv); + zBits = atoi(zEnv); else zBits = DEFAULT_SOFTWARE_DEPTH_BITS; return zBits; @@ -292,7 +292,7 @@ default_alpha_bits(void) int aBits; const char *aEnv = _mesa_getenv("MESA_GLX_ALPHA_BITS"); if (aEnv) - aBits = _mesa_atoi(aEnv); + aBits = atoi(aEnv); else aBits = 0; return aBits; diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index fd6d713..075b9a1 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -378,7 +378,7 @@ default_depth_bits(void) int zBits; const char *zEnv = _mesa_getenv("MESA_GLX_DEPTH_BITS"); if (zEnv) - zBits = _mesa_atoi(zEnv); + zBits = atoi(zEnv); else zBits = DEFAULT_SOFTWARE_DEPTH_BITS; return zBits; @@ -390,7 +390,7 @@ default_alpha_bits(void) int aBits; const char *aEnv = _mesa_getenv("MESA_GLX_ALPHA_BITS"); if (aEnv) - aBits = _mesa_atoi(aEnv); + aBits = atoi(aEnv); else aBits = 0; return aBits; diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 4c5e99f..2a0952c 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -860,13 +860,6 @@ _mesa_strdup( const char *s ) } } -/** Wrapper around atoi() */ -int -_mesa_atoi(const char *s) -{ - return atoi(s); -} - /** Wrapper around strtod() */ double _mesa_strtod( const char *s, char **end ) @@ -982,7 +975,7 @@ output_if_debug(const char *prefixString, const char *outputString, * set *to any value*. */ #ifdef DEBUG - debug = (env != NULL && _mesa_atoi(env) == 0) ? 0 : 1; + debug = (env != NULL && atoi(env) == 0) ? 0 : 1; #else debug = (env != NULL) ? 1 : 0; #endif diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 3c8f734..1246421 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -614,9 +614,6 @@ _mesa_getenv( const char *var ); extern char * _mesa_strdup( const char *s ); -extern int -_mesa_atoi( const char *s ); - extern double _mesa_strtod( const char *s, char **end ); diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 79b2e59..ff3a921 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -580,7 +580,7 @@ Parse_TextureImageId(struct parse_state *parseState, imageSrc[2] != 'X') { RETURN_ERROR1("Expected TEX# source"); } - unit = _mesa_atoi((const char *) imageSrc + 3); + unit = atoi((const char *) imageSrc + 3); if ((unit < 0 || unit > MAX_TEXTURE_IMAGE_UNITS) || (unit == 0 && (imageSrc[3] != '0' || imageSrc[4] != 0))) { RETURN_ERROR1("Invalied TEX# source index"); @@ -717,7 +717,7 @@ Parse_TempReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR1("Expected R## or H##"); if (IsDigit(token[1])) { - GLint reg = _mesa_atoi((const char *) (token + 1)); + GLint reg = atoi((const char *) (token + 1)); if (token[0] == 'H') reg += 32; if (reg >= MAX_NV_FRAGMENT_PROGRAM_TEMPS) @@ -768,7 +768,7 @@ Parse_ProgramParamReg(struct parse_state *parseState, GLint *regNum) if (IsDigit(token[0])) { /* a numbered program parameter register */ - GLint reg = _mesa_atoi((const char *) token); + GLint reg = atoi((const char *) token); if (reg >= MAX_NV_FRAGMENT_PROGRAM_PARAMS) RETURN_ERROR1("Invalid constant program number"); *regNum = reg; diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index cd5b57f..630de7c 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -309,7 +309,7 @@ Parse_TempReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR1("Expected R##"); if (IsDigit(token[1])) { - GLint reg = _mesa_atoi((char *) (token + 1)); + GLint reg = atoi((char *) (token + 1)); if (reg >= MAX_NV_VERTEX_PROGRAM_TEMPS) RETURN_ERROR1("Bad temporary register name"); *tempRegNum = reg; @@ -363,7 +363,7 @@ Parse_AbsParamReg(struct parse_state *parseState, GLint *regNum) if (IsDigit(token[0])) { /* a numbered program parameter register */ - GLint reg = _mesa_atoi((char *) token); + GLint reg = atoi((char *) token); if (reg >= MAX_NV_VERTEX_PROGRAM_PARAMS) RETURN_ERROR1("Bad program parameter number"); *regNum = reg; @@ -397,7 +397,7 @@ Parse_ParamReg(struct parse_state *parseState, struct prog_src_register *srcReg) /* a numbered program parameter register */ GLint reg; (void) Parse_Token(parseState, token); - reg = _mesa_atoi((char *) token); + reg = atoi((char *) token); if (reg >= MAX_NV_VERTEX_PROGRAM_PARAMS) RETURN_ERROR1("Bad program parameter number"); srcReg->File = PROGRAM_ENV_PARAM; @@ -423,7 +423,7 @@ Parse_ParamReg(struct parse_state *parseState, struct prog_src_register *srcReg) RETURN_ERROR; if (IsDigit(token[0])) { - const GLint k = _mesa_atoi((char *) token); + const GLint k = atoi((char *) token); if (sign == '-') { if (k > 64) RETURN_ERROR1("Bad address offset"); @@ -480,7 +480,7 @@ Parse_AttribReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR1("Only v[0] accessible in vertex state programs"); if (IsDigit(token[0])) { - GLint reg = _mesa_atoi((char *) token); + GLint reg = atoi((char *) token); if (reg >= MAX_NV_VERTEX_PROGRAM_INPUTS) RETURN_ERROR1("Bad vertex attribute register name"); *tempRegNum = reg; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index c3b49ed..44310d2 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1385,7 +1385,7 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) location = _mesa_lookup_uniform(shProg->Uniforms, newName); if (location >= 0) { - const GLint element = _mesa_atoi(c + 1); + const GLint element = atoi(c + 1); if (element > 0) { /* get type of the uniform array element */ struct gl_program_parameter *p; -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:49
|
--- src/mesa/main/imports.c | 7 ------- src/mesa/main/imports.h | 3 --- src/mesa/shader/nvfragparse.c | 6 +++--- src/mesa/shader/nvvertparse.c | 6 +++--- src/mesa/shader/prog_parameter.c | 2 +- src/mesa/shader/slang/slang_compile.c | 2 +- 6 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index a48f05c..4c5e99f 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -841,13 +841,6 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strncmp() */ -int -_mesa_strncmp( const char *s1, const char *s2, size_t n ) -{ - return strncmp(s1, s2, n); -} - /** * Implemented using _mesa_malloc() and strcpy. * Note that NULL is handled accordingly. diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 867bce7..3c8f734 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -611,9 +611,6 @@ _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, extern char * _mesa_getenv( const char *var ); -extern int -_mesa_strncmp( const char *s1, const char *s2, size_t n ); - extern char * _mesa_strdup( const char *s ); diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 661e7a2..79b2e59 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -224,7 +224,7 @@ MatchInstruction(const GLubyte *token) result.suffixes = 0; for (inst = Instructions; inst->name; inst++) { - if (_mesa_strncmp((const char *) token, inst->name, 3) == 0) { + if (strncmp((const char *) token, inst->name, 3) == 0) { /* matched! */ int i = 3; result = *inst; @@ -1495,11 +1495,11 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget, _mesa_set_program_error(ctx, -1, NULL); /* check the program header */ - if (_mesa_strncmp((const char *) programString, "!!FP1.0", 7) == 0) { + if (strncmp((const char *) programString, "!!FP1.0", 7) == 0) { target = GL_FRAGMENT_PROGRAM_NV; parseState.pos = programString + 7; } - else if (_mesa_strncmp((const char *) programString, "!!FCP1.0", 8) == 0) { + else if (strncmp((const char *) programString, "!!FCP1.0", 8) == 0) { /* fragment / register combiner program - not supported */ _mesa_set_program_error(ctx, 0, "Invalid fragment program header"); _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV(bad header)"); diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index a983c3d..cd5b57f 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -1313,18 +1313,18 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, _mesa_set_program_error(ctx, -1, NULL); /* check the program header */ - if (_mesa_strncmp((const char *) programString, "!!VP1.0", 7) == 0) { + if (strncmp((const char *) programString, "!!VP1.0", 7) == 0) { target = GL_VERTEX_PROGRAM_NV; parseState.pos = programString + 7; parseState.isStateProgram = GL_FALSE; } - else if (_mesa_strncmp((const char *) programString, "!!VP1.1", 7) == 0) { + else if (strncmp((const char *) programString, "!!VP1.1", 7) == 0) { target = GL_VERTEX_PROGRAM_NV; parseState.pos = programString + 7; parseState.isStateProgram = GL_FALSE; parseState.isVersion1_1 = GL_TRUE; } - else if (_mesa_strncmp((const char *) programString, "!!VSP1.0", 8) == 0) { + else if (strncmp((const char *) programString, "!!VSP1.0", 8) == 0) { target = GL_VERTEX_STATE_PROGRAM_NV; parseState.pos = programString + 8; parseState.isStateProgram = GL_TRUE; diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index b0ccf7b..435e6ce 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -537,7 +537,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, /* name is not null-terminated, use nameLen */ for (i = 0; i < (GLint) paramList->NumParameters; i++) { if (paramList->Parameters[i].Name && - _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 + strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 && strlen(paramList->Parameters[i].Name) == (size_t)nameLen) return i; } diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 1a2c391..41d51cd 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -65,7 +65,7 @@ static GLboolean legal_identifier(slang_atom name) { /* "gl_" is a reserved prefix */ - if (_mesa_strncmp((char *) name, "gl_", 3) == 0) { + if (strncmp((char *) name, "gl_", 3) == 0) { return GL_FALSE; } return GL_TRUE; -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:48
|
--- src/gallium/state_trackers/glx/xlib/glx_api.c | 12 ++++++------ src/mesa/drivers/fbdev/glfbdev.c | 2 +- src/mesa/drivers/osmesa/osmesa.c | 2 +- src/mesa/drivers/windows/gdi/mesa.def | 3 +-- src/mesa/drivers/windows/icd/mesa.def | 1 - src/mesa/drivers/x11/fakeglx.c | 12 ++++++------ src/mesa/glapi/gl_enums.py | 2 +- src/mesa/glapi/mesadef.py | 1 - src/mesa/main/enums.c | 2 +- src/mesa/main/extensions.c | 4 ++-- src/mesa/main/imports.c | 7 ------- src/mesa/main/imports.h | 3 --- src/mesa/shader/nvfragparse.c | 12 ++++++------ src/mesa/shader/nvvertparse.c | 6 +++--- src/mesa/shader/prog_parameter.c | 6 +++--- src/mesa/shader/prog_uniform.c | 2 +- src/mesa/shader/slang/slang_codegen.c | 8 ++++---- src/mesa/shader/slang/slang_compile.c | 3 +-- src/mesa/shader/slang/slang_print.c | 2 +- src/mesa/shader/slang/slang_utility.h | 2 +- 20 files changed, 39 insertions(+), 53 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index 7e86e68..971b6e7 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -447,12 +447,12 @@ get_env_visual(Display *dpy, int scr, const char *varname) sscanf( value, "%s %d", type, &depth ); - if (_mesa_strcmp(type,"TrueColor")==0) xclass = TrueColor; - else if (_mesa_strcmp(type,"DirectColor")==0) xclass = DirectColor; - else if (_mesa_strcmp(type,"PseudoColor")==0) xclass = PseudoColor; - else if (_mesa_strcmp(type,"StaticColor")==0) xclass = StaticColor; - else if (_mesa_strcmp(type,"GrayScale")==0) xclass = GrayScale; - else if (_mesa_strcmp(type,"StaticGray")==0) xclass = StaticGray; + if (strcmp(type,"TrueColor")==0) xclass = TrueColor; + else if (strcmp(type,"DirectColor")==0) xclass = DirectColor; + else if (strcmp(type,"PseudoColor")==0) xclass = PseudoColor; + else if (strcmp(type,"StaticColor")==0) xclass = StaticColor; + else if (strcmp(type,"GrayScale")==0) xclass = GrayScale; + else if (strcmp(type,"StaticGray")==0) xclass = StaticGray; if (xclass>-1 && depth>0) { vis = get_visual( dpy, scr, depth, xclass ); diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c index 1a56b23..51bd235 100644 --- a/src/mesa/drivers/fbdev/glfbdev.c +++ b/src/mesa/drivers/fbdev/glfbdev.c @@ -330,7 +330,7 @@ glFBDevGetProcAddress( const char *procName ) }; const struct name_address *entry; for (entry = functions; entry->name; entry++) { - if (_mesa_strcmp(entry->name, procName) == 0) { + if (strcmp(entry->name, procName) == 0) { return entry->func; } } diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index bac8a9e..1c469b1 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1579,7 +1579,7 @@ OSMesaGetProcAddress( const char *funcName ) { int i; for (i = 0; functions[i].Name; i++) { - if (_mesa_strcmp(functions[i].Name, funcName) == 0) + if (strcmp(functions[i].Name, funcName) == 0) return functions[i].Function; } return _glapi_get_proc_address(funcName); diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def index a31dc55..10e4c4a 100644 --- a/src/mesa/drivers/windows/gdi/mesa.def +++ b/src/mesa/drivers/windows/gdi/mesa.def @@ -926,7 +926,6 @@ EXPORTS _mesa_store_texsubimage1d _mesa_store_texsubimage2d _mesa_store_texsubimage3d - _mesa_strcmp _mesa_test_proxy_teximage _mesa_reference_framebuffer _mesa_update_framebuffer_visual @@ -966,4 +965,4 @@ EXPORTS _tnl_InvalidateState _tnl_run_pipeline _tnl_program_string - _tnl_RasterPos \ No newline at end of file + _tnl_RasterPos diff --git a/src/mesa/drivers/windows/icd/mesa.def b/src/mesa/drivers/windows/icd/mesa.def index 25ac08a..c4b9bff 100644 --- a/src/mesa/drivers/windows/icd/mesa.def +++ b/src/mesa/drivers/windows/icd/mesa.def @@ -72,7 +72,6 @@ EXPORTS _mesa_store_texsubimage1d _mesa_store_texsubimage2d _mesa_store_texsubimage3d - _mesa_strcmp _mesa_test_proxy_teximage _mesa_Viewport _mesa_meta_CopyColorSubTable diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 3b8c41b..fd6d713 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -621,12 +621,12 @@ get_env_visual(Display *dpy, int scr, const char *varname) sscanf( value, "%s %d", type, &depth ); - if (_mesa_strcmp(type,"TrueColor")==0) xclass = TrueColor; - else if (_mesa_strcmp(type,"DirectColor")==0) xclass = DirectColor; - else if (_mesa_strcmp(type,"PseudoColor")==0) xclass = PseudoColor; - else if (_mesa_strcmp(type,"StaticColor")==0) xclass = StaticColor; - else if (_mesa_strcmp(type,"GrayScale")==0) xclass = GrayScale; - else if (_mesa_strcmp(type,"StaticGray")==0) xclass = StaticGray; + if (strcmp(type,"TrueColor")==0) xclass = TrueColor; + else if (strcmp(type,"DirectColor")==0) xclass = DirectColor; + else if (strcmp(type,"PseudoColor")==0) xclass = PseudoColor; + else if (strcmp(type,"StaticColor")==0) xclass = StaticColor; + else if (strcmp(type,"GrayScale")==0) xclass = GrayScale; + else if (strcmp(type,"StaticGray")==0) xclass = StaticGray; if (xclass>-1 && depth>0) { vis = get_visual( dpy, scr, depth, xclass ); diff --git a/src/mesa/glapi/gl_enums.py b/src/mesa/glapi/gl_enums.py index acaa06a..adb0ca5 100644 --- a/src/mesa/glapi/gl_enums.py +++ b/src/mesa/glapi/gl_enums.py @@ -70,7 +70,7 @@ typedef int (*cfunc)(const void *, const void *); */ static int compar_name( const char *a, const enum_elt *b ) { - return _mesa_strcmp( a, & enum_string_table[ b->offset ] ); + return strcmp( a, & enum_string_table[ b->offset ] ); } /** diff --git a/src/mesa/glapi/mesadef.py b/src/mesa/glapi/mesadef.py index 342c9cd..8df0414 100644 --- a/src/mesa/glapi/mesadef.py +++ b/src/mesa/glapi/mesadef.py @@ -152,7 +152,6 @@ def PrintTail(): print '\t_mesa_store_texsubimage1d' print '\t_mesa_store_texsubimage2d' print '\t_mesa_store_texsubimage3d' - print '\t_mesa_strcmp' print '\t_mesa_test_proxy_teximage' print '\t_mesa_Viewport' print '\t_mesa_meta_CopyColorSubTable' diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index 1d495b7..fc7f8be 100644 --- a/src/mesa/main/enums.c +++ b/src/mesa/main/enums.c @@ -5181,7 +5181,7 @@ typedef int (*cfunc)(const void *, const void *); */ static int compar_name( const char *a, const enum_elt *b ) { - return _mesa_strcmp( a, & enum_string_table[ b->offset ] ); + return strcmp( a, & enum_string_table[ b->offset ] ); } /** diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 6449f39..9b0b5f0 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -498,7 +498,7 @@ set_extension( GLcontext *ctx, const char *name, GLboolean state ) } for (i = 0 ; i < Elements(default_extensions) ; i++) { - if (_mesa_strcmp(default_extensions[i].name, name) == 0) { + if (strcmp(default_extensions[i].name, name) == 0) { if (default_extensions[i].flag_offset) { GLboolean *enabled = base + default_extensions[i].flag_offset; *enabled = state; @@ -560,7 +560,7 @@ _mesa_extension_is_enabled( GLcontext *ctx, const char *name ) GLuint i; for (i = 0 ; i < Elements(default_extensions) ; i++) { - if (_mesa_strcmp(default_extensions[i].name, name) == 0) { + if (strcmp(default_extensions[i].name, name) == 0) { return extension_enabled(ctx, i); } } diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index dc24ea0..a48f05c 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -841,13 +841,6 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strcmp() */ -int -_mesa_strcmp( const char *s1, const char *s2 ) -{ - return strcmp(s1, s2); -} - /** Wrapper around strncmp() */ int _mesa_strncmp( const char *s1, const char *s2, size_t n ) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index f66cf0d..867bce7 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -612,9 +612,6 @@ extern char * _mesa_getenv( const char *var ); extern int -_mesa_strcmp( const char *s1, const char *s2 ); - -extern int _mesa_strncmp( const char *s1, const char *s2, size_t n ); extern char * diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index b219dfa..661e7a2 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -802,7 +802,7 @@ Parse_FragReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR; } for (j = 0; InputRegisters[j]; j++) { - if (_mesa_strcmp((const char *) token, InputRegisters[j]) == 0) { + if (strcmp((const char *) token, InputRegisters[j]) == 0) { *tempRegNum = j; parseState->inputsRead |= (1 << j); break; @@ -835,13 +835,13 @@ Parse_OutputReg(struct parse_state *parseState, GLint *outputRegNum) RETURN_ERROR; /* try to match an output register name */ - if (_mesa_strcmp((char *) token, "COLR") == 0 || - _mesa_strcmp((char *) token, "COLH") == 0) { + if (strcmp((char *) token, "COLR") == 0 || + strcmp((char *) token, "COLH") == 0) { /* note that we don't distinguish between COLR and COLH */ *outputRegNum = FRAG_RESULT_COLOR; parseState->outputsWritten |= (1 << FRAG_RESULT_COLOR); } - else if (_mesa_strcmp((char *) token, "DEPR") == 0) { + else if (strcmp((char *) token, "DEPR") == 0) { *outputRegNum = FRAG_RESULT_DEPTH; parseState->outputsWritten |= (1 << FRAG_RESULT_DEPTH); } @@ -868,8 +868,8 @@ Parse_MaskedDstReg(struct parse_state *parseState, if (!Peek_Token(parseState, token)) RETURN_ERROR; - if (_mesa_strcmp((const char *) token, "RC") == 0 || - _mesa_strcmp((const char *) token, "HC") == 0) { + if (strcmp((const char *) token, "RC") == 0 || + strcmp((const char *) token, "HC") == 0) { /* a write-only register */ dstReg->File = PROGRAM_WRITE_ONLY; if (!Parse_DummyReg(parseState, &idx)) diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index 90f795a..a983c3d 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -403,7 +403,7 @@ Parse_ParamReg(struct parse_state *parseState, struct prog_src_register *srcReg) srcReg->File = PROGRAM_ENV_PARAM; srcReg->Index = reg; } - else if (_mesa_strcmp((const char *) token, "A0") == 0) { + else if (strcmp((const char *) token, "A0") == 0) { /* address register "A0.x" */ if (!Parse_AddrReg(parseState)) RETURN_ERROR; @@ -487,7 +487,7 @@ Parse_AttribReg(struct parse_state *parseState, GLint *tempRegNum) } else { for (j = 0; InputRegisters[j]; j++) { - if (_mesa_strcmp((const char *) token, InputRegisters[j]) == 0) { + if (strcmp((const char *) token, InputRegisters[j]) == 0) { *tempRegNum = j; break; } @@ -531,7 +531,7 @@ Parse_OutputReg(struct parse_state *parseState, GLint *outputRegNum) /* try to match an output register name */ for (j = start; OutputRegisters[j]; j++) { - if (_mesa_strcmp((const char *) token, OutputRegisters[j]) == 0) { + if (strcmp((const char *) token, OutputRegisters[j]) == 0) { *outputRegNum = j; break; } diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 0c52c25..b0ccf7b 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -215,7 +215,7 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, pvals[1] == values[1] && pvals[2] == values[2] && pvals[3] == values[3] && - _mesa_strcmp(paramList->Parameters[pos].Name, name) == 0) { + strcmp(paramList->Parameters[pos].Name, name) == 0) { /* Same name and value is already in the param list - reuse it */ return pos; } @@ -325,7 +325,7 @@ _mesa_use_uniform(struct gl_program_parameter_list *paramList, for (i = 0; i < paramList->NumParameters; i++) { struct gl_program_parameter *p = paramList->Parameters + i; if ((p->Type == PROGRAM_UNIFORM || p->Type == PROGRAM_SAMPLER) && - _mesa_strcmp(p->Name, name) == 0) { + strcmp(p->Name, name) == 0) { p->Used = GL_TRUE; /* Note that large uniforms may occupy several slots so we're * not done searching yet. @@ -529,7 +529,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, /* name is null-terminated */ for (i = 0; i < (GLint) paramList->NumParameters; i++) { if (paramList->Parameters[i].Name && - _mesa_strcmp(paramList->Parameters[i].Name, name) == 0) + strcmp(paramList->Parameters[i].Name, name) == 0) return i; } } diff --git a/src/mesa/shader/prog_uniform.c b/src/mesa/shader/prog_uniform.c index cdfe158..a831ce8 100644 --- a/src/mesa/shader/prog_uniform.c +++ b/src/mesa/shader/prog_uniform.c @@ -128,7 +128,7 @@ _mesa_lookup_uniform(const struct gl_uniform_list *list, const char *name) { GLuint i; for (i = 0; list && i < list->NumUniforms; i++) { - if (!_mesa_strcmp(list->Uniforms[i].Name, name)) { + if (!strcmp(list->Uniforms[i].Name, name)) { return i; } } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index fe4bddf..2280ceb 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1020,7 +1020,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, GLuint i; v = _slang_variable_locate(oper->locals, id, GL_TRUE); if (!v) { - if (_mesa_strcmp((char *) oper->a_id, "__notRetFlag")) + if (strcmp((char *) oper->a_id, "__notRetFlag")) _mesa_problem(NULL, "var %s not found!\n", (char *) oper->a_id); return; } @@ -1658,7 +1658,7 @@ slang_find_asm_info(const char *name) { GLuint i; for (i = 0; AsmInfo[i].Name; i++) { - if (_mesa_strcmp(AsmInfo[i].Name, name) == 0) { + if (strcmp(AsmInfo[i].Name, name) == 0) { return AsmInfo + i; } } @@ -2317,7 +2317,7 @@ _slang_is_vec_mat_type(const char *name) }; int i; for (i = 0; vecmat_types[i]; i++) - if (_mesa_strcmp(name, vecmat_types[i]) == 0) + if (strcmp(name, vecmat_types[i]) == 0) return GL_TRUE; return GL_FALSE; } @@ -5224,7 +5224,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) slang_ir_node *n; GLboolean success = GL_TRUE; - if (_mesa_strcmp((char *) fun->header.a_name, "main") != 0) { + if (strcmp((char *) fun->header.a_name, "main") != 0) { /* we only really generate code for main, all other functions get * inlined or codegen'd upon an actual call. */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 65842ac..1a2c391 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2563,8 +2563,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, { slang_function *func; success = parse_function(C, &o, 1, &func); - if (success && - _mesa_strcmp((char *) func->header.a_name, "main") == 0) { + if (success && strcmp((char *) func->header.a_name, "main") == 0) { /* found main() */ mainFunc = func; } diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index 98c7877..6efc5b7 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -698,7 +698,7 @@ slang_print_function(const slang_function *f, GLboolean body) GLuint i; #if 0 - if (_mesa_strcmp((char *) f->header.a_name, "main") != 0) + if (strcmp((char *) f->header.a_name, "main") != 0) return; #endif diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 10071f2..2c0d0bc 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -32,7 +32,7 @@ #define static_assert(expr) do { int _array[(expr) ? 1 : -1]; (void) _array[0]; } while (0) -#define slang_string_compare(str1, str2) _mesa_strcmp (str1, str2) +#define slang_string_compare(str1, str2) strcmp (str1, str2) #define slang_string_copy(dst, src) strcpy (dst, src) #define slang_string_length(str) strlen (str) -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:47
|
--- src/mesa/main/cpuinfo.c | 2 +- src/mesa/main/extensions.c | 10 +++++----- src/mesa/main/imports.c | 9 +-------- src/mesa/main/imports.h | 3 --- src/mesa/main/shaders.c | 2 +- src/mesa/shader/arbprogram.c | 4 ++-- src/mesa/shader/atifragshader.c | 2 +- src/mesa/shader/nvfragparse.c | 2 +- src/mesa/shader/nvprogram.c | 4 ++-- src/mesa/shader/nvvertparse.c | 2 +- src/mesa/shader/prog_parameter.c | 4 ++-- src/mesa/shader/prog_uniform.c | 2 +- src/mesa/shader/slang/slang_compile.c | 10 +++++----- src/mesa/shader/slang/slang_emit.c | 2 +- src/mesa/shader/slang/slang_label.c | 2 +- src/mesa/shader/slang/slang_link.c | 2 +- src/mesa/shader/slang/slang_mem.c | 2 +- src/mesa/shader/slang/slang_utility.c | 2 +- src/mesa/shader/slang/slang_utility.h | 2 +- 19 files changed, 29 insertions(+), 39 deletions(-) diff --git a/src/mesa/main/cpuinfo.c b/src/mesa/main/cpuinfo.c index b4bfb40..79fcbc7 100644 --- a/src/mesa/main/cpuinfo.c +++ b/src/mesa/main/cpuinfo.c @@ -103,7 +103,7 @@ _mesa_get_cpu_string(void) #endif - assert(_mesa_strlen(buffer) < MAX_STRING); + assert(strlen(buffer) < MAX_STRING); return buffer; } diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 87c1fac..6449f39 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -574,8 +574,8 @@ _mesa_extension_is_enabled( GLcontext *ctx, const char *name ) static char * append(const char *a, const char *b) { - const GLuint aLen = a ? _mesa_strlen(a) : 0; - const GLuint bLen = b ? _mesa_strlen(b) : 0; + const GLuint aLen = a ? strlen(a) : 0; + const GLuint bLen = b ? strlen(b) : 0; char *s = _mesa_calloc(aLen + bLen + 1); if (s) { if (a) @@ -677,12 +677,12 @@ _mesa_make_extension_string( GLcontext *ctx ) /* first, compute length of the extension string */ for (i = 0 ; i < Elements(default_extensions) ; i++) { if (extension_enabled(ctx, i)) { - extStrLen += (GLuint)_mesa_strlen(default_extensions[i].name) + 1; + extStrLen += (GLuint) strlen(default_extensions[i].name) + 1; } } if (extraExt) - extStrLen += _mesa_strlen(extraExt) + 1; /* +1 for space */ + extStrLen += strlen(extraExt) + 1; /* +1 for space */ /* allocate the extension string */ s = (char *) _mesa_malloc(extStrLen); @@ -693,7 +693,7 @@ _mesa_make_extension_string( GLcontext *ctx ) extStrLen = 0; for (i = 0 ; i < Elements(default_extensions) ; i++) { if (extension_enabled(ctx, i)) { - GLuint len = (GLuint)_mesa_strlen(default_extensions[i].name); + GLuint len = (GLuint) strlen(default_extensions[i].name); _mesa_memcpy(s + extStrLen, default_extensions[i].name, len); extStrLen += len; s[extStrLen] = ' '; diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 78c5cad..dc24ea0 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -841,13 +841,6 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strlen() */ -size_t -_mesa_strlen( const char *s ) -{ - return strlen(s); -} - /** Wrapper around strcmp() */ int _mesa_strcmp( const char *s1, const char *s2 ) @@ -870,7 +863,7 @@ char * _mesa_strdup( const char *s ) { if (s) { - size_t l = _mesa_strlen(s); + size_t l = strlen(s); char *s2 = (char *) _mesa_malloc(l + 1); if (s2) strcpy(s2, s); diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 192dffe..f66cf0d 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -611,9 +611,6 @@ _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, extern char * _mesa_getenv( const char *var ); -extern size_t -_mesa_strlen( const char *s ); - extern int _mesa_strcmp( const char *s1, const char *s2 ); diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index d0dc7e5..b9c84eb 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -447,7 +447,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, return; } if (length == NULL || length[i] < 0) - offsets[i] = _mesa_strlen(string[i]); + offsets[i] = strlen(string[i]); else offsets[i] = length[i]; /* accumulate string lengths */ diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index 7e3040a..a77ff7c 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -910,7 +910,7 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params) switch (pname) { case GL_PROGRAM_LENGTH_ARB: *params - = prog->String ? (GLint) _mesa_strlen((char *) prog->String) : 0; + = prog->String ? (GLint) strlen((char *) prog->String) : 0; return; case GL_PROGRAM_FORMAT_ARB: *params = prog->Format; @@ -1091,7 +1091,7 @@ _mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string) } if (prog->String) - _mesa_memcpy(dst, prog->String, _mesa_strlen((char *) prog->String)); + _mesa_memcpy(dst, prog->String, strlen((char *) prog->String)); else *dst = '\0'; } diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c index 28dbf77..3e26c43 100644 --- a/src/mesa/shader/atifragshader.c +++ b/src/mesa/shader/atifragshader.c @@ -115,7 +115,7 @@ create_dst_mod_str(GLuint mod) if (mod & GL_SATURATE_BIT_ATI) strncat(ret_str, "|SAT", 1024); - if (_mesa_strlen(ret_str) == 0) + if (strlen(ret_str) == 0) strncat(ret_str, "NONE", 1024); return ret_str; } diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 8ee7c93..b219dfa 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -378,7 +378,7 @@ Peek_Token(struct parse_state *parseState, GLubyte *token) parseState->pos += (-i); return GL_FALSE; } - len = (GLint)_mesa_strlen((const char *) token); + len = (GLint) strlen((const char *) token); parseState->pos += (i - len); return GL_TRUE; } diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index c3b10f5..394b6a4 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -260,7 +260,7 @@ _mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params) *params = prog->Target; return; case GL_PROGRAM_LENGTH_NV: - *params = prog->String ?(GLint)_mesa_strlen((char *) prog->String) : 0; + *params = prog->String ?(GLint) strlen((char *) prog->String) : 0; return; case GL_PROGRAM_RESIDENT_NV: *params = prog->Resident; @@ -297,7 +297,7 @@ _mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program) } if (prog->String) { - MEMCPY(program, prog->String, _mesa_strlen((char *) prog->String)); + MEMCPY(program, prog->String, strlen((char *) prog->String)); } else { program[0] = 0; diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index baff765..90f795a 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -232,7 +232,7 @@ Peek_Token(struct parse_state *parseState, GLubyte *token) parseState->pos += (-i); return GL_FALSE; } - len = (GLint)_mesa_strlen((const char *) token); + len = (GLint) strlen((const char *) token); parseState->pos += (i - len); return GL_TRUE; } diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index d4970c4..0c52c25 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -538,7 +538,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, for (i = 0; i < (GLint) paramList->NumParameters; i++) { if (paramList->Parameters[i].Name && _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 - && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen) + && strlen(paramList->Parameters[i].Name) == (size_t)nameLen) return i; } } @@ -723,7 +723,7 @@ _mesa_longest_parameter_name(const struct gl_program_parameter_list *list, return 0; for (i = 0; i < list->NumParameters; i++) { if (list->Parameters[i].Type == type) { - GLuint len = _mesa_strlen(list->Parameters[i].Name); + GLuint len = strlen(list->Parameters[i].Name); if (len > maxLen) maxLen = len; } diff --git a/src/mesa/shader/prog_uniform.c b/src/mesa/shader/prog_uniform.c index 0642713..cdfe158 100644 --- a/src/mesa/shader/prog_uniform.c +++ b/src/mesa/shader/prog_uniform.c @@ -142,7 +142,7 @@ _mesa_longest_uniform_name(const struct gl_uniform_list *list) GLint max = 0; GLuint i; for (i = 0; list && i < list->NumUniforms; i++) { - GLint len = (GLint)_mesa_strlen(list->Uniforms[i].Name); + GLint len = (GLint) strlen(list->Uniforms[i].Name); if (len > max) max = len; } diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 33964e0..65842ac 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -167,7 +167,7 @@ static void parse_identifier_str(slang_parse_ctx * C, char **id) { *id = (char *) C->I; - C->I += _mesa_strlen(*id) + 1; + C->I += strlen(*id) + 1; } static slang_atom @@ -176,7 +176,7 @@ parse_identifier(slang_parse_ctx * C) const char *id; id = (const char *) C->I; - C->I += _mesa_strlen(id) + 1; + C->I += strlen(id) + 1; return slang_atom_pool_atom(C->atoms, id); } @@ -298,9 +298,9 @@ parse_float(slang_parse_ctx * C, float *number) parse_identifier_str(C, &fractional); parse_identifier_str(C, &exponent); - whole = (char *) _slang_alloc((_mesa_strlen(integral) + - _mesa_strlen(fractional) + - _mesa_strlen(exponent) + 3) * sizeof(char)); + whole = (char *) _slang_alloc((strlen(integral) + + strlen(fractional) + + strlen(exponent) + 3) * sizeof(char)); if (whole == NULL) { slang_info_log_memory(C->L); RETURN0; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 0f67036..fa3a63e 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -754,7 +754,7 @@ instruction_annotation(gl_inst_opcode opcode, char *dstAnnot, s = (char *) malloc(len); sprintf(s, "%s = %s %s %s %s", dstAnnot, srcAnnot0, operator, srcAnnot1, srcAnnot2); - assert(_mesa_strlen(s) < len); + assert(strlen(s) < len); free(dstAnnot); free(srcAnnot0); diff --git a/src/mesa/shader/slang/slang_label.c b/src/mesa/shader/slang/slang_label.c index 1ca1ef0..1240621 100644 --- a/src/mesa/shader/slang/slang_label.c +++ b/src/mesa/shader/slang/slang_label.c @@ -32,7 +32,7 @@ _slang_label_new_unique(const char *name) static int id = 1; slang_label *l = (slang_label *) _slang_alloc(sizeof(slang_label)); if (l) { - l->Name = (char *) _slang_alloc(_mesa_strlen(name) + 10); + l->Name = (char *) _slang_alloc(strlen(name) + 10); if (!l->Name) { _mesa_free(l); return NULL; diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 9c90d5c..2906cb1 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -603,7 +603,7 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType) for (i = 0; i < shProg->NumShaders; i++) { const struct gl_shader *shader = shProg->Shaders[i]; if (shader->Type == shaderType) { - shaderLengths[i] = _mesa_strlen(shader->Source); + shaderLengths[i] = strlen(shader->Source); totalLen += shaderLengths[i]; if (!firstShader) firstShader = shader; diff --git a/src/mesa/shader/slang/slang_mem.c b/src/mesa/shader/slang/slang_mem.c index dc5707a..c37e12f 100644 --- a/src/mesa/shader/slang/slang_mem.c +++ b/src/mesa/shader/slang/slang_mem.c @@ -212,7 +212,7 @@ char * _slang_strdup(const char *s) { if (s) { - size_t l = _mesa_strlen(s); + size_t l = strlen(s); char *s2 = (char *) _slang_alloc(l + 1); if (s2) strcpy(s2, s); diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 950fba5..e3b0491 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -35,7 +35,7 @@ char * slang_string_concat (char *dst, const char *src) { - return strcpy (dst + _mesa_strlen (dst), src); + return strcpy (dst + strlen (dst), src); } diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 3762cc9..10071f2 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -34,7 +34,7 @@ #define slang_string_compare(str1, str2) _mesa_strcmp (str1, str2) #define slang_string_copy(dst, src) strcpy (dst, src) -#define slang_string_length(str) _mesa_strlen (str) +#define slang_string_length(str) strlen (str) char *slang_string_concat (char *, const char *); -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:46
|
--- src/gallium/state_trackers/glx/xlib/glx_api.c | 2 +- src/mesa/drivers/x11/fakeglx.c | 2 +- src/mesa/main/dlopen.c | 2 +- src/mesa/main/imports.c | 7 ------- src/mesa/main/imports.h | 3 --- 5 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index 3caf56e..7e86e68 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -442,7 +442,7 @@ get_env_visual(Display *dpy, int scr, const char *varname) return NULL; } - _mesa_strncpy( value, _mesa_getenv(varname), 100 ); + strncpy( value, _mesa_getenv(varname), 100 ); value[99] = 0; sscanf( value, "%s %d", type, &depth ); diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 5c0084f..3b8c41b 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -616,7 +616,7 @@ get_env_visual(Display *dpy, int scr, const char *varname) return NULL; } - _mesa_strncpy( value, _mesa_getenv(varname), 100 ); + strncpy( value, _mesa_getenv(varname), 100 ); value[99] = 0; sscanf( value, "%s %d", type, &depth ); diff --git a/src/mesa/main/dlopen.c b/src/mesa/main/dlopen.c index 81e0320..658ac9e 100644 --- a/src/mesa/main/dlopen.c +++ b/src/mesa/main/dlopen.c @@ -73,7 +73,7 @@ _mesa_dlsym(void *handle, const char *fname) /* need '_' prefix on symbol names */ char fname2[1000]; fname2[0] = '_'; - _mesa_strncpy(fname2 + 1, fname, 998); + strncpy(fname2 + 1, fname, 998); fname2[999] = 0; return (GenericFunc) dlsym(handle, fname2); #elif defined(_GNU_SOURCE) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 19deef5..78c5cad 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -841,13 +841,6 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strncpy() */ -char * -_mesa_strncpy( char *dest, const char *src, size_t n ) -{ - return strncpy(dest, src, n); -} - /** Wrapper around strlen() */ size_t _mesa_strlen( const char *s ) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 0143be3..192dffe 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -611,9 +611,6 @@ _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, extern char * _mesa_getenv( const char *var ); -extern char * -_mesa_strncpy( char *dest, const char *src, size_t n ); - extern size_t _mesa_strlen( const char *s ); -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:45
|
--- src/mesa/main/imports.c | 11 ++--------- src/mesa/main/imports.h | 3 --- src/mesa/shader/slang/slang_mem.c | 2 +- src/mesa/shader/slang/slang_utility.c | 2 +- src/mesa/shader/slang/slang_utility.h | 2 +- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 1a7535d..19deef5 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -841,13 +841,6 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strcpy() */ -char * -_mesa_strcpy( char *dest, const char *src ) -{ - return strcpy(dest, src); -} - /** Wrapper around strncpy() */ char * _mesa_strncpy( char *dest, const char *src, size_t n ) @@ -877,7 +870,7 @@ _mesa_strncmp( const char *s1, const char *s2, size_t n ) } /** - * Implemented using _mesa_malloc() and _mesa_strcpy. + * Implemented using _mesa_malloc() and strcpy. * Note that NULL is handled accordingly. */ char * @@ -887,7 +880,7 @@ _mesa_strdup( const char *s ) size_t l = _mesa_strlen(s); char *s2 = (char *) _mesa_malloc(l + 1); if (s2) - _mesa_strcpy(s2, s); + strcpy(s2, s); return s2; } else { diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index a3ec0c2..0143be3 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -612,9 +612,6 @@ extern char * _mesa_getenv( const char *var ); extern char * -_mesa_strcpy( char *dest, const char *src ); - -extern char * _mesa_strncpy( char *dest, const char *src, size_t n ); extern size_t diff --git a/src/mesa/shader/slang/slang_mem.c b/src/mesa/shader/slang/slang_mem.c index 9224578..dc5707a 100644 --- a/src/mesa/shader/slang/slang_mem.c +++ b/src/mesa/shader/slang/slang_mem.c @@ -215,7 +215,7 @@ _slang_strdup(const char *s) size_t l = _mesa_strlen(s); char *s2 = (char *) _slang_alloc(l + 1); if (s2) - _mesa_strcpy(s2, s); + strcpy(s2, s); return s2; } else { diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 3631e32..950fba5 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -35,7 +35,7 @@ char * slang_string_concat (char *dst, const char *src) { - return _mesa_strcpy (dst + _mesa_strlen (dst), src); + return strcpy (dst + _mesa_strlen (dst), src); } diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 032c561..3762cc9 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -33,7 +33,7 @@ #define slang_string_compare(str1, str2) _mesa_strcmp (str1, str2) -#define slang_string_copy(dst, src) _mesa_strcpy (dst, src) +#define slang_string_copy(dst, src) strcpy (dst, src) #define slang_string_length(str) _mesa_strlen (str) char *slang_string_concat (char *, const char *); -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:45
|
--- src/mesa/main/imports.c | 7 ------- src/mesa/main/imports.h | 3 --- src/mesa/shader/atifragshader.c | 16 ++++++++-------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index cd19373..1a7535d 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -841,13 +841,6 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strncat() */ -char * -_mesa_strncat( char *dest, const char *src, size_t n ) -{ - return strncat(dest, src, n); -} - /** Wrapper around strcpy() */ char * _mesa_strcpy( char *dest, const char *src ) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index c487f1d..a3ec0c2 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -612,9 +612,6 @@ extern char * _mesa_getenv( const char *var ); extern char * -_mesa_strncat( char *dest, const char *src, size_t n ); - -extern char * _mesa_strcpy( char *dest, const char *src ); extern char * diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c index ab7b203..28dbf77 100644 --- a/src/mesa/shader/atifragshader.c +++ b/src/mesa/shader/atifragshader.c @@ -98,25 +98,25 @@ create_dst_mod_str(GLuint mod) _mesa_memset(ret_str, 0, 1024); if (mod & GL_2X_BIT_ATI) - _mesa_strncat(ret_str, "|2X", 1024); + strncat(ret_str, "|2X", 1024); if (mod & GL_4X_BIT_ATI) - _mesa_strncat(ret_str, "|4X", 1024); + strncat(ret_str, "|4X", 1024); if (mod & GL_8X_BIT_ATI) - _mesa_strncat(ret_str, "|8X", 1024); + strncat(ret_str, "|8X", 1024); if (mod & GL_HALF_BIT_ATI) - _mesa_strncat(ret_str, "|HA", 1024); + strncat(ret_str, "|HA", 1024); if (mod & GL_QUARTER_BIT_ATI) - _mesa_strncat(ret_str, "|QU", 1024); + strncat(ret_str, "|QU", 1024); if (mod & GL_EIGHTH_BIT_ATI) - _mesa_strncat(ret_str, "|EI", 1024); + strncat(ret_str, "|EI", 1024); if (mod & GL_SATURATE_BIT_ATI) - _mesa_strncat(ret_str, "|SAT", 1024); + strncat(ret_str, "|SAT", 1024); if (_mesa_strlen(ret_str) == 0) - _mesa_strncat(ret_str, "NONE", 1024); + strncat(ret_str, "NONE", 1024); return ret_str; } -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:44
|
--- src/mesa/main/debug.c | 6 +++--- src/mesa/main/imports.c | 9 +-------- src/mesa/main/imports.h | 3 --- src/mesa/shader/shader_api.c | 16 ++++++++-------- src/mesa/shader/slang/slang_link.c | 2 +- 5 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 9bad834..f2182c0 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -206,17 +206,17 @@ static void add_debug_flags( const char *debug ) MESA_VERBOSE = 0x0; for (i = 0; i < Elements(debug_opt); i++) { - if (_mesa_strstr(debug, debug_opt[i].name)) + if (strstr(debug, debug_opt[i].name)) MESA_VERBOSE |= debug_opt[i].flag; } /* Debug flag: */ - if (_mesa_strstr(debug, "flush")) + if (strstr(debug, "flush")) MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH; #if defined(_FPU_GETCW) && defined(_FPU_SETCW) - if (_mesa_strstr(debug, "fpexceptions")) { + if (strstr(debug, "fpexceptions")) { /* raise FP exceptions */ fpu_control_t mask; _FPU_GETCW(mask); diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index def0452..cd19373 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -841,13 +841,6 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strstr() */ -char * -_mesa_strstr( const char *haystack, const char *needle ) -{ - return strstr(haystack, needle); -} - /** Wrapper around strncat() */ char * _mesa_strncat( char *dest, const char *src, size_t n ) @@ -1177,7 +1170,7 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... ) const char *debugEnv = _mesa_getenv("MESA_DEBUG"); #ifdef DEBUG - if (debugEnv && _mesa_strstr(debugEnv, "silent")) + if (debugEnv && strstr(debugEnv, "silent")) debug = GL_FALSE; else debug = GL_TRUE; diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index e3d2ac9..c487f1d 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -612,9 +612,6 @@ extern char * _mesa_getenv( const char *var ); extern char * -_mesa_strstr( const char *haystack, const char *needle ); - -extern char * _mesa_strncat( char *dest, const char *src, size_t n ); extern char * diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index e8eaa9c..c3b49ed 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -374,21 +374,21 @@ get_shader_flags(void) const char *env = _mesa_getenv("MESA_GLSL"); if (env) { - if (_mesa_strstr(env, "dump")) + if (strstr(env, "dump")) flags |= GLSL_DUMP; - if (_mesa_strstr(env, "log")) + if (strstr(env, "log")) flags |= GLSL_LOG; - if (_mesa_strstr(env, "nopvert")) + if (strstr(env, "nopvert")) flags |= GLSL_NOP_VERT; - if (_mesa_strstr(env, "nopfrag")) + if (strstr(env, "nopfrag")) flags |= GLSL_NOP_FRAG; - if (_mesa_strstr(env, "nopt")) + if (strstr(env, "nopt")) flags |= GLSL_NO_OPT; - else if (_mesa_strstr(env, "opt")) + else if (strstr(env, "opt")) flags |= GLSL_OPT; - if (_mesa_strstr(env, "uniform")) + if (strstr(env, "uniform")) flags |= GLSL_UNIFORMS; - if (_mesa_strstr(env, "useprog")) + if (strstr(env, "useprog")) flags |= GLSL_USE_PROG; } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 75b0022..9c90d5c 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -563,7 +563,7 @@ remove_extra_version_directives(GLchar *source) { GLuint verCount = 0; while (1) { - char *ver = _mesa_strstr(source, "#version"); + char *ver = strstr(source, "#version"); if (ver) { verCount++; if (verCount > 1) { -- 1.7.0 |
From: Kenneth G. <ke...@wh...> - 2010-02-19 07:52:43
|
These patches remove various _mesa_foo() wrappers in favor of simply calling foo() directly. I've split them out by function so it's possible to pick and choose which ones to apply. Sorry for the spam. I figured I'd resend updated copies since Brian mentioned possibly including them before the 7.8 release. The last three may break the SUNOS4 build, but I doubt anyone cares seeing as the last release of that system was in 1994. |
From: Chia-I Wu <ol...@gm...> - 2010-02-19 04:50:41
|
On Fri, Feb 19, 2010 at 8:25 AM, Brian Paul <br...@vm...> wrote: >> Assuming this plan still works for people, I'll make the mesa_7_8_branch >> on Friday, February 26th. > I think we could get by with a shorter "beta" period. There's a few > more things that would be nice to do for 7.8 which I doubt I'd get to > before the 26th: > 1. GL_APPLE_object_purgeable - I think the last round of patches > looked OK. Chris? > 2. _mesa_memcpy() -> memcpy(), etc. replacement. There were patches > for this that haven't been applied yet. Maybe someone could pick > those up. > 3. I'm tempted to remove some old Mesa drivers such as glide, tdfx, > allegro, ggi, dri/mga, dri/mach64. Maybe more. Any objections? I like this change. There are some Makefiles under src/mesa/main/. Are they still used? Could we remove them? -- ol...@Lu... |
From: Kristian H. <kr...@bi...> - 2010-02-19 02:08:51
|
2010/2/18 Brian Paul <br...@vm...>: > Kristian Høgsberg wrote: >> >> 2010/2/12 Ian Romanick <id...@fr...>: >>> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> Kristian Høgsberg wrote: >>>> >>>> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c >>>> b/src/mesa/drivers/dri/intel/intel_screen.c >>>> index f7ce87e..c2c8c6e 100644 >>>> --- a/src/mesa/drivers/dri/intel/intel_screen.c >>>> +++ b/src/mesa/drivers/dri/intel/intel_screen.c >>>> @@ -41,6 +41,7 @@ >>>> #include "intel_fbo.h" >>>> #include "intel_screen.h" >>>> #include "intel_tex.h" >>>> +#include "intel_regions.h" >>>> >>>> #include "i915_drm.h" >>>> >>>> @@ -141,11 +142,84 @@ static const struct __DRI2flushExtensionRec >>>> intelFlushExtension = { >>>> intelDRI2FlushInvalidate, >>>> }; >>>> >>>> +static __DRIimage * >>>> +intel_create_image_internal(__DRIcontext *context, >>>> + int width, int height, int internal_format, >>>> + int name, int pitch, void *loaderPrivate) >>>> +{ >>>> + __DRIimage *image; >>>> + struct intel_context *intel = context->driverPrivate; >>>> + int cpp; >>>> + >>>> + image = CALLOC(sizeof *image); >>>> + image->internal_format = internal_format; >>>> + switch (internal_format) { >>>> + case GL_RGBA: >>>> + image->format = MESA_FORMAT_ARGB8888; >>>> + image->data_type = GL_UNSIGNED_BYTE; >>>> + break; >>>> + case GL_RGB: >>>> + image->format = MESA_FORMAT_XRGB8888; >>>> + image->data_type = GL_UNSIGNED_BYTE; >>>> + break; >>>> + } >>> >>> No love for 565 or 4444 pixmaps? >> >> Good question. What is a sufficient way to specify the pixel format? >> Internal format + datatype? That's what glTexImage2D uses and should >> be enough to describe the type of content and layout of the color >> components, for example GL_RGB8 + GL_UNSIGNED_INT_8_8_8_8. > > That particular format/type combo is invalid for glTexImage, btw. That was meant as an internalformat/type combo - that's valid right? >> Alternatively we can expose the MESA_FORMAT_* values as __DRI_FORMAT_* >> tokens and use that in the __DRIimage extension. > > I haven't followed this too closely... but FYI, there's no guarantee that > the MESA_FORMAT_x token values won't change at any time. If you create some > __DRI_FORMAT_x tokens they should probably have different values just to be > safe. Yeah, they would be different tokens, the idea was to specify color components and layout with one token similar to how the MESA_FORMAT_* defines work, not to expose the MESA_FORMAT_* values directly. But I'm leaning aginst not going for this idea. I'm trying to figure out if it's appropriate to assume that all drivers for a given chipset will choose the same pixel layout for, say GL_RGBA8 or GL_RGB5. Then when we create an EGLImage from a GEM (or TTM) handle we only need to pass GL_RGBA8 as the format value and the driver will know how the components are laid out. Or do we need to specify the pixel layout as well. Still not sure... Kristian |
From: <bug...@fr...> - 2010-02-19 01:04:30
|
http://bugs.freedesktop.org/show_bug.cgi?id=26632 --- Comment #9 from Brian Paul <bri...@gm...> 2010-02-18 16:28:30 PST --- I think you still need a 'rm -rf ${LIBNAME}.obj' command like the other targets. That'll get rid of the temp directory made by the expand_archives function. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. |
From: Brian P. <br...@vm...> - 2010-02-19 01:03:32
|
Ian Romanick wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Ian Romanick wrote: >> All, >> >> It's time again to plan what version or versions of Mesa we want to >> release in Q1 (end of March). It seems like 7.7.1 is a no-brainer. Do >> we also want to release Mesa 7.8? I haven't been keeping track of >> master, so I don't know what its state is. Is it pretty stable? Are >> there any big branches waiting to land? >> >> Working backwards from a "last week of March" release, master would have >> to branch to mesa_7_8_branch during the last week of February. That's >> roughly 6 weeks away. >> >> Thoughts? Opinions? > > Assuming this plan still works for people, I'll make the mesa_7_8_branch > on Friday, February 26th. I think we could get by with a shorter "beta" period. There's a few more things that would be nice to do for 7.8 which I doubt I'd get to before the 26th: 1. GL_APPLE_object_purgeable - I think the last round of patches looked OK. Chris? 2. _mesa_memcpy() -> memcpy(), etc. replacement. There were patches for this that haven't been applied yet. Maybe someone could pick those up. 3. I'm tempted to remove some old Mesa drivers such as glide, tdfx, allegro, ggi, dri/mga, dri/mach64. Maybe more. Any objections? -Brian |
From: Brian P. <br...@vm...> - 2010-02-19 00:56:01
|
Kristian Høgsberg wrote: > 2010/2/12 Ian Romanick <id...@fr...>: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Kristian Høgsberg wrote: >>> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c >>> index f7ce87e..c2c8c6e 100644 >>> --- a/src/mesa/drivers/dri/intel/intel_screen.c >>> +++ b/src/mesa/drivers/dri/intel/intel_screen.c >>> @@ -41,6 +41,7 @@ >>> #include "intel_fbo.h" >>> #include "intel_screen.h" >>> #include "intel_tex.h" >>> +#include "intel_regions.h" >>> >>> #include "i915_drm.h" >>> >>> @@ -141,11 +142,84 @@ static const struct __DRI2flushExtensionRec intelFlushExtension = { >>> intelDRI2FlushInvalidate, >>> }; >>> >>> +static __DRIimage * >>> +intel_create_image_internal(__DRIcontext *context, >>> + int width, int height, int internal_format, >>> + int name, int pitch, void *loaderPrivate) >>> +{ >>> + __DRIimage *image; >>> + struct intel_context *intel = context->driverPrivate; >>> + int cpp; >>> + >>> + image = CALLOC(sizeof *image); >>> + image->internal_format = internal_format; >>> + switch (internal_format) { >>> + case GL_RGBA: >>> + image->format = MESA_FORMAT_ARGB8888; >>> + image->data_type = GL_UNSIGNED_BYTE; >>> + break; >>> + case GL_RGB: >>> + image->format = MESA_FORMAT_XRGB8888; >>> + image->data_type = GL_UNSIGNED_BYTE; >>> + break; >>> + } >> No love for 565 or 4444 pixmaps? > > Good question. What is a sufficient way to specify the pixel format? > Internal format + datatype? That's what glTexImage2D uses and should > be enough to describe the type of content and layout of the color > components, for example GL_RGB8 + GL_UNSIGNED_INT_8_8_8_8. That particular format/type combo is invalid for glTexImage, btw. > Alternatively we can expose the MESA_FORMAT_* values as __DRI_FORMAT_* > tokens and use that in the __DRIimage extension. I haven't followed this too closely... but FYI, there's no guarantee that the MESA_FORMAT_x token values won't change at any time. If you create some __DRI_FORMAT_x tokens they should probably have different values just to be safe. -Brian > That would be > client-api independent, but GL tokens and types are already a > dependency in the DRI driver interface, so reusing the glTexImage2D > arguments wouldn't introduce new dependencies. The problem with this > approach is that it requires the caller to know too much about the > pixel layout. We don't actually know the pixel layout for a pixmap, > so the EGL doesn't know which layout to tell the DRI driver to use. > > For DRI2 drawables, we assert that the DDX and DRI drivers agree on > the detail layout of the color components and we just need to > communicated the bits per pixel. Can we keep do that for EGLImages > too? Note, we don't need to provide enough information that clients > can map and access the pixels in the EGLImage. The various client > APIs already provide mechanisms and detail information on pixel layout > for that. We just need enough information to make sure that when we > pass buffers around, client APIs (OpenGL/OpenVG/etc) and external > users (DDX, cairo-drm, KMS) agree on the format. As such, GL_RGBA8, > for example, is enough, since the drivers will all pick the same > underlying layout. > > So... I think just using the internalFormat values will be fine. The > semantics will be "pick the driver preferred layout for the provided > internalFormat". Does that sounds feasible? > > Kristian > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Mesa3d-dev mailing list > Mes...@li... > https://lists.sourceforge.net/lists/listinfo/mesa3d-dev |
From: Brian P. <br...@vm...> - 2010-02-19 00:53:37
|
tom fogal wrote: > Ian Romanick <id...@fr...> writes: >> Since we're not using CVS, would it be possible to start naming the >> release branches with just the release version? Likewise for release >> tags? Specifically, I'm proposing to use 7.8 for this next branch >> and 7.8.0 for the release tag. > > +1. It's a pain to type out the full name all the time ;) I like keeping things consistent but this change would be OK. -Brian |