_mesa_free(v);
return NULL;
}
- MEMCPY(v->visinfo, visinfo, sizeof(*visinfo));
+ memcpy(v->visinfo, visinfo, sizeof(*visinfo));
v->ximage_flag = ximage_flag;
}
}
#else
- MEMCPY( address, pixels, rows*bufferpitch );
+ memcpy( address, pixels, rows*bufferpitch );
#endif
do_draw_pix( ctx, x, y, width, rows,
const GLint widthInBytes = width * 2;
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst += dstStride;
src -= srcStride;
}
{
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst += dstStride;
src -= srcStride;
}
(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) {
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst -= dstStride;
src += srcStride;
}
texImage->Data);
ti->padded = GL_TRUE;
} else {
- MEMCPY(texImage->Data, data, compressedSize);
+ memcpy(texImage->Data, data, compressedSize);
}
RevalidateTexture(ctx, texObj);
rows = height / 4; /* [dBorca] hardcoded 4, but works for FXT1/DXTC */
for (i = 0; i < rows; i++) {
- MEMCPY(dest, data, srcRowStride);
+ memcpy(dest, data, srcRowStride);
dest += destRowStride;
data = (GLvoid *)((intptr_t)data + (intptr_t)srcRowStride);
}
const GLint widthInBytes = width * 2;
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst += dstStride;
src -= srcStride;
}
const GLint widthInBytes = width * 2;
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst += dstStride;
src -= srcStride;
}
for (row = 0; row < height; row++) {
GLubyte *src = (GLubyte *) _mesa_image_address2d(finalUnpack,
pixels, width, height, format, type, row, 0);
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst += dstStride;
}
}
texImage->Data);
ti->padded = GL_TRUE;
} else {
- MEMCPY(texImage->Data, data, texImage->CompressedSize);
+ memcpy(texImage->Data, data, texImage->CompressedSize);
}
ti->info.format = mml->glideFormat;
rows = height / 4; /* hardcoded 4, but works for FXT1/DXTC */
for (i = 0; i < rows; i++) {
- MEMCPY(dest, data, srcRowStride);
+ memcpy(dest, data, srcRowStride);
dest += destRowStride;
data = (GLvoid *)((GLuint)data + (GLuint)srcRowStride);
}
static void
copy_colortable_info(XMesaBuffer dst, const XMesaBuffer src)
{
- MEMCPY(dst->color_table, src->color_table, sizeof(src->color_table));
- MEMCPY(dst->pixel_to_r, src->pixel_to_r, sizeof(src->pixel_to_r));
- MEMCPY(dst->pixel_to_g, src->pixel_to_g, sizeof(src->pixel_to_g));
- MEMCPY(dst->pixel_to_b, src->pixel_to_b, sizeof(src->pixel_to_b));
+ memcpy(dst->color_table, src->color_table, sizeof(src->color_table));
+ memcpy(dst->pixel_to_r, src->pixel_to_r, sizeof(src->pixel_to_r));
+ memcpy(dst->pixel_to_g, src->pixel_to_g, sizeof(src->pixel_to_g));
+ memcpy(dst->pixel_to_b, src->pixel_to_b, sizeof(src->pixel_to_b));
dst->num_alloced = src->num_alloced;
- MEMCPY(dst->alloced_colors, src->alloced_colors,
+ memcpy(dst->alloced_colors, src->alloced_colors,
sizeof(src->alloced_colors));
}
_mesa_free(v);
return NULL;
}
- MEMCPY(v->visinfo, visinfo, sizeof(*visinfo));
+ memcpy(v->visinfo, visinfo, sizeof(*visinfo));
#endif
/* check for MESA_GAMMA environment variable */
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);
}
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];
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);
}
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;
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;
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);
}
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);
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);
}
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);
}
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);
}
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:
}
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:
_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;
}
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;
}
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 );
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;
data->ElementArrayBufferObj->Name);
#endif
- MEMCPY( ctx->Array.ArrayObj, data->ArrayObj,
+ memcpy( ctx->Array.ArrayObj, data->ArrayObj,
sizeof( struct gl_array_object ) );
FREE( data->ArrayObj );
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;
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));
_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;
_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;
_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;
_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;
_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;
_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;
/** 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)
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);
}
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,
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);
}
}
/* 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 {
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);
}
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,
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);
}
}
}
}
else {
- MEMCPY(values, pm->Map, mapsize * sizeof(GLfloat));
+ memcpy(values, pm->Map, mapsize * sizeof(GLfloat));
}
_mesa_unmap_pbo_dest(ctx, &ctx->Pack);
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++) {
return;
/* copy the data */
- MEMCPY(texImage->Data, data, imageSize);
+ memcpy(texImage->Data, data, imageSize);
_mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
}
/* copy rows of blocks */
for (i = 0; i < rows; i++) {
- MEMCPY(dest, src, bytesPerRow);
+ memcpy(dest, src, bytesPerRow);
dest += destRowStride;
src += srcRowStride;
}
}
else {
/* pure translation */
- MEMCPY( out, Identity, sizeof(Identity) );
+ memcpy( out, Identity, sizeof(Identity) );
MAT(out,0,3) = - MAT(in,0,3);
MAT(out,1,3) = - MAT(in,1,3);
MAT(out,2,3) = - MAT(in,2,3);
*/
static GLboolean invert_matrix_identity( GLmatrix *mat )
{
- MEMCPY( mat->inv, Identity, sizeof(Identity) );
+ memcpy( mat->inv, Identity, sizeof(Identity) );
return GL_TRUE;
}
if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0 || MAT(in,2,2) == 0 )
return GL_FALSE;
- MEMCPY( out, Identity, 16 * sizeof(GLfloat) );
+ memcpy( out, Identity, 16 * sizeof(GLfloat) );
MAT(out,0,0) = 1.0F / MAT(in,0,0);
MAT(out,1,1) = 1.0F / MAT(in,1,1);
MAT(out,2,2) = 1.0F / MAT(in,2,2);
if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0)
return GL_FALSE;
- MEMCPY( out, Identity, 16 * sizeof(GLfloat) );
+ memcpy( out, Identity, 16 * sizeof(GLfloat) );
MAT(out,0,0) = 1.0F / MAT(in,0,0);
MAT(out,1,1) = 1.0F / MAT(in,1,1);
if (MAT(in,2,3) == 0)
return GL_FALSE;
- MEMCPY( out, Identity, 16 * sizeof(GLfloat) );
+ memcpy( out, Identity, 16 * sizeof(GLfloat) );
MAT(out,0,0) = 1.0F / MAT(in,0,0);
MAT(out,1,1) = 1.0F / MAT(in,1,1);
return GL_TRUE;
} else {
mat->flags |= MAT_FLAG_SINGULAR;
- MEMCPY( mat->inv, Identity, sizeof(Identity) );
+ memcpy( mat->inv, Identity, sizeof(Identity) );
return GL_FALSE;
}
}
s = (GLfloat) _mesa_sin( angle * DEG2RAD );
c = (GLfloat) _mesa_cos( angle * DEG2RAD );
- MEMCPY(m, Identity, sizeof(GLfloat)*16);
+ memcpy(m, Identity, sizeof(GLfloat)*16);
optimized = GL_FALSE;
#define M(row,col) m[col*4+row]
void
_math_matrix_set_identity( GLmatrix *mat )
{
- MEMCPY( mat->m, Identity, 16*sizeof(GLfloat) );
+ memcpy( mat->m, Identity, 16*sizeof(GLfloat) );
if (mat->inv)
- MEMCPY( mat->inv, Identity, 16*sizeof(GLfloat) );
+ memcpy( mat->inv, Identity, 16*sizeof(GLfloat) );
mat->type = MATRIX_IDENTITY;
mat->flags &= ~(MAT_DIRTY_FLAGS|
void
_math_matrix_copy( GLmatrix *to, const GLmatrix *from )
{
- MEMCPY( to->m, from->m, sizeof(Identity) );
+ memcpy( to->m, from->m, sizeof(Identity) );
to->flags = from->flags;
to->type = from->type;
matrix_invert( to );
}
else {
- MEMCPY(to->inv, from->inv, sizeof(GLfloat)*16);
+ memcpy(to->inv, from->inv, sizeof(GLfloat)*16);
}
}
}
void
_math_matrix_loadf( GLmatrix *mat, const GLfloat *m )
{
- MEMCPY( mat->m, m, 16*sizeof(GLfloat) );
+ memcpy( mat->m, m, 16*sizeof(GLfloat) );
mat->flags = (MAT_FLAG_GENERAL | MAT_DIRTY);
}
{
m->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 );
if (m->m)
- MEMCPY( m->m, Identity, sizeof(Identity) );
+ memcpy( m->m, Identity, sizeof(Identity) );
m->inv = NULL;
m->type = MATRIX_IDENTITY;
m->flags = 0;
if (!m->inv) {
m->inv = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 );
if (m->inv)
- MEMCPY( m->inv, Identity, 16 * sizeof(GLfloat) );
+ memcpy( m->inv, Identity, 16 * sizeof(GLfloat) );
}
}
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
return;
}
- MEMCPY(programString, str, len);
+ memcpy(programString, str, len);
programString[len] = 0;
/* Get ready to parse */
}
if (prog->String) {
- MEMCPY(program, prog->String, strlen((char *) prog->String));
+ memcpy(program, prog->String, strlen((char *) prog->String));
}
else {
program[0] = 0;
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
return;
}
- MEMCPY(programString, str, len);
+ memcpy(programString, str, len);
programString[len] = 0;
/* Get ready to parse */
load_transpose_matrix(GLfloat registers[][4], GLuint pos,
const GLfloat mat[16])
{
- MEMCPY(registers[pos], mat, 16 * sizeof(GLfloat));
+ memcpy(registers[pos], mat, 16 * sizeof(GLfloat));
}
((zoomed.array->ChanType == GL_UNSIGNED_SHORT) ? 4 * sizeof(GLushort)
: 4 * sizeof(GLfloat));
if (y1 - y0 > 1) {
- MEMCPY(rgbaSave, zoomed.array->rgba, zoomed.end * pixelSize);
+ memcpy(rgbaSave, zoomed.array->rgba, zoomed.end * pixelSize);
}
for (zoomed.y = y0; zoomed.y < y1; zoomed.y++) {
_swrast_write_rgba_span(ctx, &zoomed);
zoomed.end = end; /* restore */
if (y1 - y0 > 1) {
/* restore the colors */
- MEMCPY(zoomed.array->rgba, rgbaSave, zoomed.end * pixelSize);
+ memcpy(zoomed.array->rgba, rgbaSave, zoomed.end * pixelSize);
}
}
}
GLuint *indexSave = (GLuint *) zoomed.array->attribs[FRAG_ATTRIB_FOGC];
const GLint end = zoomed.end; /* save */
if (y1 - y0 > 1) {
- MEMCPY(indexSave, zoomed.array->index, zoomed.end * sizeof(GLuint));
+ memcpy(indexSave, zoomed.array->index, zoomed.end * sizeof(GLuint));
}
for (zoomed.y = y0; zoomed.y < y1; zoomed.y++) {
_swrast_write_index_span(ctx, &zoomed);
zoomed.end = end; /* restore */
if (y1 - y0 > 1) {
/* restore the colors */
- MEMCPY(zoomed.array->index, indexSave, zoomed.end * sizeof(GLuint));
+ memcpy(zoomed.array->index, indexSave, zoomed.end * sizeof(GLuint));
}
}
}
*/
for (i = 0 ; i < MAX_PIPELINE_STAGES && stages[i] ; i++) {
struct tnl_pipeline_stage *s = &tnl->pipeline.stages[i];
- MEMCPY(s, stages[i], sizeof(*s));
+ memcpy(s, stages[i], sizeof(*s));
if (s->create)
s->create(ctx, s);
}
init_machine(GLcontext *ctx, struct gl_program_machine *machine)
{
/* Input registers get initialized from the current vertex attribs */
- MEMCPY(machine->VertAttribs, ctx->Current.Attrib,
+ memcpy(machine->VertAttribs, ctx->Current.Attrib,
MAX_VERTEX_GENERIC_ATTRIBS * 4 * sizeof(GLfloat));
if (ctx->VertexProgram._Current->IsNVProgram) {