summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-02-19 08:09:01 -0700
committerBrian Paul <brianp@vmware.com>2010-02-19 08:09:01 -0700
commite197de56cdb86835f1437688a9161cd909792d80 (patch)
treebbdf4447d51a43093d27c3a1016b6f661dc24fa8 /src/mesa/main
parent2efa86ea3040c37965987160733b22e2a0541a3e (diff)
mesa: replace old MEMCPY macro with memcpy
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/attrib.c60
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/dlist.c14
-rw-r--r--src/mesa/main/imports.h2
-rw-r--r--src/mesa/main/mipmap.c40
-rw-r--r--src/mesa/main/pixel.c4
-rw-r--r--src/mesa/main/texstore.c4
7 files changed, 62 insertions, 64 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 881644cdaf..44dc3b871e 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -222,7 +222,7 @@ _mesa_PushAttrib(GLbitfield mask)
if (mask & GL_ACCUM_BUFFER_BIT) {
struct gl_accum_attrib *attr;
attr = MALLOC_STRUCT( gl_accum_attrib );
- MEMCPY( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) );
+ memcpy( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) );
save_attrib_data(&head, GL_ACCUM_BUFFER_BIT, attr);
}
@@ -230,7 +230,7 @@ _mesa_PushAttrib(GLbitfield mask)
GLuint i;
struct gl_colorbuffer_attrib *attr;
attr = MALLOC_STRUCT( gl_colorbuffer_attrib );
- MEMCPY( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) );
+ memcpy( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) );
/* push the Draw FBO's DrawBuffer[] state, not ctx->Color.DrawBuffer[] */
for (i = 0; i < ctx->Const.MaxDrawBuffers; i ++)
attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i];
@@ -241,14 +241,14 @@ _mesa_PushAttrib(GLbitfield mask)
struct gl_current_attrib *attr;
FLUSH_CURRENT( ctx, 0 );
attr = MALLOC_STRUCT( gl_current_attrib );
- MEMCPY( attr, &ctx->Current, sizeof(struct gl_current_attrib) );
+ memcpy( attr, &ctx->Current, sizeof(struct gl_current_attrib) );
save_attrib_data(&head, GL_CURRENT_BIT, attr);
}
if (mask & GL_DEPTH_BUFFER_BIT) {
struct gl_depthbuffer_attrib *attr;
attr = MALLOC_STRUCT( gl_depthbuffer_attrib );
- MEMCPY( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) );
+ memcpy( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) );
save_attrib_data(&head, GL_DEPTH_BUFFER_BIT, attr);
}
@@ -292,7 +292,7 @@ _mesa_PushAttrib(GLbitfield mask)
attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4;
attr->Map1Vertex3 = ctx->Eval.Map1Vertex3;
attr->Map1Vertex4 = ctx->Eval.Map1Vertex4;
- MEMCPY(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib));
+ memcpy(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib));
attr->Map2Color4 = ctx->Eval.Map2Color4;
attr->Map2Index = ctx->Eval.Map2Index;
attr->Map2Normal = ctx->Eval.Map2Normal;
@@ -302,7 +302,7 @@ _mesa_PushAttrib(GLbitfield mask)
attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4;
attr->Map2Vertex3 = ctx->Eval.Map2Vertex3;
attr->Map2Vertex4 = ctx->Eval.Map2Vertex4;
- MEMCPY(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib));
+ memcpy(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib));
attr->Normalize = ctx->Transform.Normalize;
attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped;
attr->PointSmooth = ctx->Point.SmoothFlag;
@@ -336,21 +336,21 @@ _mesa_PushAttrib(GLbitfield mask)
if (mask & GL_EVAL_BIT) {
struct gl_eval_attrib *attr;
attr = MALLOC_STRUCT( gl_eval_attrib );
- MEMCPY( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) );
+ memcpy( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) );
save_attrib_data(&head, GL_EVAL_BIT, attr);
}
if (mask & GL_FOG_BIT) {
struct gl_fog_attrib *attr;
attr = MALLOC_STRUCT( gl_fog_attrib );
- MEMCPY( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) );
+ memcpy( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) );
save_attrib_data(&head, GL_FOG_BIT, attr);
}
if (mask & GL_HINT_BIT) {
struct gl_hint_attrib *attr;
attr = MALLOC_STRUCT( gl_hint_attrib );
- MEMCPY( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) );
+ memcpy( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) );
save_attrib_data(&head, GL_HINT_BIT, attr);
}
@@ -358,28 +358,28 @@ _mesa_PushAttrib(GLbitfield mask)
struct gl_light_attrib *attr;
FLUSH_CURRENT(ctx, 0); /* flush material changes */
attr = MALLOC_STRUCT( gl_light_attrib );
- MEMCPY( attr, &ctx->Light, sizeof(struct gl_light_attrib) );
+ memcpy( attr, &ctx->Light, sizeof(struct gl_light_attrib) );
save_attrib_data(&head, GL_LIGHTING_BIT, attr);
}
if (mask & GL_LINE_BIT) {
struct gl_line_attrib *attr;
attr = MALLOC_STRUCT( gl_line_attrib );
- MEMCPY( attr, &ctx->Line, sizeof(struct gl_line_attrib) );
+ memcpy( attr, &ctx->Line, sizeof(struct gl_line_attrib) );
save_attrib_data(&head, GL_LINE_BIT, attr);
}
if (mask & GL_LIST_BIT) {
struct gl_list_attrib *attr;
attr = MALLOC_STRUCT( gl_list_attrib );
- MEMCPY( attr, &ctx->List, sizeof(struct gl_list_attrib) );
+ memcpy( attr, &ctx->List, sizeof(struct gl_list_attrib) );
save_attrib_data(&head, GL_LIST_BIT, attr);
}
if (mask & GL_PIXEL_MODE_BIT) {
struct gl_pixel_attrib *attr;
attr = MALLOC_STRUCT( gl_pixel_attrib );
- MEMCPY( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) );
+ memcpy( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) );
/* push the Read FBO's ReadBuffer state, not ctx->Pixel.ReadBuffer */
attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer;
save_attrib_data(&head, GL_PIXEL_MODE_BIT, attr);
@@ -388,35 +388,35 @@ _mesa_PushAttrib(GLbitfield mask)
if (mask & GL_POINT_BIT) {
struct gl_point_attrib *attr;
attr = MALLOC_STRUCT( gl_point_attrib );
- MEMCPY( attr, &ctx->Point, sizeof(struct gl_point_attrib) );
+ memcpy( attr, &ctx->Point, sizeof(struct gl_point_attrib) );
save_attrib_data(&head, GL_POINT_BIT, attr);
}
if (mask & GL_POLYGON_BIT) {
struct gl_polygon_attrib *attr;
attr = MALLOC_STRUCT( gl_polygon_attrib );
- MEMCPY( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) );
+ memcpy( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) );
save_attrib_data(&head, GL_POLYGON_BIT, attr);
}
if (mask & GL_POLYGON_STIPPLE_BIT) {
GLuint *stipple;
stipple = (GLuint *) MALLOC( 32*sizeof(GLuint) );
- MEMCPY( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) );
+ memcpy( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) );
save_attrib_data(&head, GL_POLYGON_STIPPLE_BIT, stipple);
}
if (mask & GL_SCISSOR_BIT) {
struct gl_scissor_attrib *attr;
attr = MALLOC_STRUCT( gl_scissor_attrib );
- MEMCPY( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) );
+ memcpy( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) );
save_attrib_data(&head, GL_SCISSOR_BIT, attr);
}
if (mask & GL_STENCIL_BUFFER_BIT) {
struct gl_stencil_attrib *attr;
attr = MALLOC_STRUCT( gl_stencil_attrib );
- MEMCPY( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) );
+ memcpy( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) );
save_attrib_data(&head, GL_STENCIL_BUFFER_BIT, attr);
}
@@ -460,14 +460,14 @@ _mesa_PushAttrib(GLbitfield mask)
if (mask & GL_TRANSFORM_BIT) {
struct gl_transform_attrib *attr;
attr = MALLOC_STRUCT( gl_transform_attrib );
- MEMCPY( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) );
+ memcpy( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) );
save_attrib_data(&head, GL_TRANSFORM_BIT, attr);
}
if (mask & GL_VIEWPORT_BIT) {
struct gl_viewport_attrib *attr;
attr = MALLOC_STRUCT( gl_viewport_attrib );
- MEMCPY( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) );
+ memcpy( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) );
save_attrib_data(&head, GL_VIEWPORT_BIT, attr);
}
@@ -475,7 +475,7 @@ _mesa_PushAttrib(GLbitfield mask)
if (mask & GL_MULTISAMPLE_BIT_ARB) {
struct gl_multisample_attrib *attr;
attr = MALLOC_STRUCT( gl_multisample_attrib );
- MEMCPY( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) );
+ memcpy( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) );
save_attrib_data(&head, GL_MULTISAMPLE_BIT_ARB, attr);
}
@@ -1010,7 +1010,7 @@ _mesa_PopAttrib(void)
break;
case GL_CURRENT_BIT:
FLUSH_CURRENT( ctx, 0 );
- MEMCPY( &ctx->Current, attr->data,
+ memcpy( &ctx->Current, attr->data,
sizeof(struct gl_current_attrib) );
break;
case GL_DEPTH_BUFFER_BIT:
@@ -1032,7 +1032,7 @@ _mesa_PopAttrib(void)
}
break;
case GL_EVAL_BIT:
- MEMCPY( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) );
+ memcpy( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) );
ctx->NewState |= _NEW_EVAL;
break;
case GL_FOG_BIT:
@@ -1126,7 +1126,7 @@ _mesa_PopAttrib(void)
_mesa_set_enable(ctx, GL_COLOR_MATERIAL,
light->ColorMaterialEnabled);
/* materials */
- MEMCPY(&ctx->Light.Material, &light->Material,
+ memcpy(&ctx->Light.Material, &light->Material,
sizeof(struct gl_material));
}
break;
@@ -1141,10 +1141,10 @@ _mesa_PopAttrib(void)
}
break;
case GL_LIST_BIT:
- MEMCPY( &ctx->List, attr->data, sizeof(struct gl_list_attrib) );
+ memcpy( &ctx->List, attr->data, sizeof(struct gl_list_attrib) );
break;
case GL_PIXEL_MODE_BIT:
- MEMCPY( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) );
+ memcpy( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) );
/* XXX what other pixel state needs to be set by function calls? */
_mesa_ReadBuffer(ctx->Pixel.ReadBuffer);
ctx->NewState |= _NEW_PIXEL;
@@ -1203,7 +1203,7 @@ _mesa_PopAttrib(void)
}
break;
case GL_POLYGON_STIPPLE_BIT:
- MEMCPY( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) );
+ memcpy( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) );
ctx->NewState |= _NEW_POLYGONSTIPPLE;
if (ctx->Driver.PolygonStipple)
ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data );
@@ -1417,8 +1417,8 @@ _mesa_PushClientAttrib(GLbitfield mask)
ctx->Array.ElementArrayBufferObj->RefCount++;
#endif
- MEMCPY( attr, &ctx->Array, sizeof(struct gl_array_attrib) );
- MEMCPY( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) );
+ memcpy( attr, &ctx->Array, sizeof(struct gl_array_attrib) );
+ memcpy( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) );
attr->ArrayObj = obj;
@@ -1492,7 +1492,7 @@ _mesa_PopClientAttrib(void)
data->ElementArrayBufferObj->Name);
#endif
- MEMCPY( ctx->Array.ArrayObj, data->ArrayObj,
+ memcpy( ctx->Array.ArrayObj, data->ArrayObj,
sizeof( struct gl_array_object ) );
FREE( data->ArrayObj );
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index c292d1fea5..f315f0b212 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1108,7 +1108,7 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
dst->Polygon = src->Polygon;
}
if (mask & GL_POLYGON_STIPPLE_BIT) {
- /* Use loop instead of MEMCPY due to problem with Portland Group's
+ /* Use loop instead of memcpy due to problem with Portland Group's
* C compiler. Reported by John Stone.
*/
GLuint i;
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index ea0d13b890..9c472d85e3 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -2913,7 +2913,7 @@ save_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values)
n[1].e = map;
n[2].i = mapsize;
n[3].data = (void *) _mesa_malloc(mapsize * sizeof(GLfloat));
- MEMCPY(n[3].data, (void *) values, mapsize * sizeof(GLfloat));
+ memcpy(n[3].data, (void *) values, mapsize * sizeof(GLfloat));
}
if (ctx->ExecuteFlag) {
CALL_PixelMapfv(ctx->Exec, (map, mapsize, values));
@@ -4365,7 +4365,7 @@ save_CompressedTexImage1DARB(GLenum target, GLint level,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB");
return;
}
- MEMCPY(image, data, imageSize);
+ memcpy(image, data, imageSize);
n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7);
if (n) {
n[1].e = target;
@@ -4411,7 +4411,7 @@ save_CompressedTexImage2DARB(GLenum target, GLint level,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB");
return;
}
- MEMCPY(image, data, imageSize);
+ memcpy(image, data, imageSize);
n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8);
if (n) {
n[1].e = target;
@@ -4458,7 +4458,7 @@ save_CompressedTexImage3DARB(GLenum target, GLint level,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB");
return;
}
- MEMCPY(image, data, imageSize);
+ memcpy(image, data, imageSize);
n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9);
if (n) {
n[1].e = target;
@@ -4501,7 +4501,7 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB");
return;
}
- MEMCPY(image, data, imageSize);
+ memcpy(image, data, imageSize);
n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7);
if (n) {
n[1].e = target;
@@ -4541,7 +4541,7 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB");
return;
}
- MEMCPY(image, data, imageSize);
+ memcpy(image, data, imageSize);
n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9);
if (n) {
n[1].e = target;
@@ -4583,7 +4583,7 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB");
return;
}
- MEMCPY(image, data, imageSize);
+ memcpy(image, data, imageSize);
n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11);
if (n) {
n[1].e = target;
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index d5ab7cdc20..c4e28df051 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -71,8 +71,6 @@ extern "C" {
/** Free aligned memory */
#define ALIGN_FREE(PTR) _mesa_align_free(PTR)
-/** 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 ) memset(DST, VAL, N)
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 77cd1d4159..1da576337f 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -979,9 +979,9 @@ make_1d_mipmap(GLenum datatype, GLuint comps, GLint border,
if (border) {
/* copy left-most pixel from source */
- MEMCPY(dstPtr, srcPtr, bpt);
+ memcpy(dstPtr, srcPtr, bpt);
/* copy right-most pixel from source */
- MEMCPY(dstPtr + (dstWidth - 1) * bpt,
+ memcpy(dstPtr + (dstWidth - 1) * bpt,
srcPtr + (srcWidth - 1) * bpt,
bpt);
}
@@ -1025,15 +1025,15 @@ make_2d_mipmap(GLenum datatype, GLuint comps, GLint border,
if (border > 0) {
/* fill in dest border */
/* lower-left border pixel */
- MEMCPY(dstPtr, srcPtr, bpt);
+ memcpy(dstPtr, srcPtr, bpt);
/* lower-right border pixel */
- MEMCPY(dstPtr + (dstWidth - 1) * bpt,
+ memcpy(dstPtr + (dstWidth - 1) * bpt,
srcPtr + (srcWidth - 1) * bpt, bpt);
/* upper-left border pixel */
- MEMCPY(dstPtr + dstWidth * (dstHeight - 1) * bpt,
+ memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt,
srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt);
/* upper-right border pixel */
- MEMCPY(dstPtr + (dstWidth * dstHeight - 1) * bpt,
+ memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt,
srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt);
/* lower border */
do_row(datatype, comps, srcWidthNB,
@@ -1050,9 +1050,9 @@ make_2d_mipmap(GLenum datatype, GLuint comps, GLint border,
if (srcHeight == dstHeight) {
/* copy border pixel from src to dst */
for (row = 1; row < srcHeight; row++) {
- MEMCPY(dstPtr + dstWidth * row * bpt,
+ memcpy(dstPtr + dstWidth * row * bpt,
srcPtr + srcWidth * row * bpt, bpt);
- MEMCPY(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
+ memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt);
}
}
@@ -1174,28 +1174,28 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
/* do border along [img][row=0][col=0] */
src = srcPtr + (img + 1) * bytesPerSrcImage;
dst = dstPtr + (img + 1) * bytesPerDstImage;
- MEMCPY(dst, src, bpt);
+ memcpy(dst, src, bpt);
/* do border along [img][row=dstHeight-1][col=0] */
src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ (srcHeight - 1) * bytesPerSrcRow;
dst = dstPtr + (img + 1) * bytesPerDstImage
+ (dstHeight - 1) * bytesPerDstRow;
- MEMCPY(dst, src, bpt);
+ memcpy(dst, src, bpt);
/* do border along [img][row=0][col=dstWidth-1] */
src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ (srcWidth - 1) * bpt;
dst = dstPtr + (img + 1) * bytesPerDstImage
+ (dstWidth - 1) * bpt;
- MEMCPY(dst, src, bpt);
+ memcpy(dst, src, bpt);
/* do border along [img][row=dstHeight-1][col=dstWidth-1] */
src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
+ (bytesPerSrcImage - bpt);
dst = dstPtr + (img + 1) * bytesPerDstImage
+ (bytesPerDstImage - bpt);
- MEMCPY(dst, src, bpt);
+ memcpy(dst, src, bpt);
}
}
else {
@@ -1265,9 +1265,9 @@ make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
if (border) {
/* copy left-most pixel from source */
- MEMCPY(dstPtr, srcPtr, bpt);
+ memcpy(dstPtr, srcPtr, bpt);
/* copy right-most pixel from source */
- MEMCPY(dstPtr + (dstWidth - 1) * bpt,
+ memcpy(dstPtr + (dstWidth - 1) * bpt,
srcPtr + (srcWidth - 1) * bpt,
bpt);
}
@@ -1319,15 +1319,15 @@ make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
if (border > 0) {
/* fill in dest border */
/* lower-left border pixel */
- MEMCPY(dstPtr, srcPtr, bpt);
+ memcpy(dstPtr, srcPtr, bpt);
/* lower-right border pixel */
- MEMCPY(dstPtr + (dstWidth - 1) * bpt,
+ memcpy(dstPtr + (dstWidth - 1) * bpt,
srcPtr + (srcWidth - 1) * bpt, bpt);
/* upper-left border pixel */
- MEMCPY(dstPtr + dstWidth * (dstHeight - 1) * bpt,
+ memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt,
srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt);
/* upper-right border pixel */
- MEMCPY(dstPtr + (dstWidth * dstHeight - 1) * bpt,
+ memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt,
srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt);
/* lower border */
do_row(datatype, comps, srcWidthNB,
@@ -1344,9 +1344,9 @@ make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
if (srcHeight == dstHeight) {
/* copy border pixel from src to dst */
for (row = 1; row < srcHeight; row++) {
- MEMCPY(dstPtr + dstWidth * row * bpt,
+ memcpy(dstPtr + dstWidth * row * bpt,
srcPtr + srcWidth * row * bpt, bpt);
- MEMCPY(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
+ memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt);
}
}
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index ca6ecd7bfb..f6c316a580 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -362,7 +362,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values )
}
}
else {
- MEMCPY(values, pm->Map, mapsize * sizeof(GLfloat));
+ memcpy(values, pm->Map, mapsize * sizeof(GLfloat));
}
_mesa_unmap_pbo_dest(ctx, &ctx->Pack);
@@ -401,7 +401,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values )
if (map == GL_PIXEL_MAP_S_TO_S) {
/* special case */
- MEMCPY(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint));
+ memcpy(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint));
}
else {
for (i = 0; i < mapsize; i++) {
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index c1418e0967..ab572a13ed 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -3716,7 +3716,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
return;
/* copy the data */
- MEMCPY(texImage->Data, data, imageSize);
+ memcpy(texImage->Data, data, imageSize);
_mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
}
@@ -3823,7 +3823,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
/* copy rows of blocks */
for (i = 0; i < rows; i++) {
- MEMCPY(dest, src, bytesPerRow);
+ memcpy(dest, src, bytesPerRow);
dest += destRowStride;
src += srcRowStride;
}