summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-02-19 08:09:01 -0700
committerBrian Paul <[email protected]>2010-02-19 08:09:01 -0700
commite197de56cdb86835f1437688a9161cd909792d80 (patch)
treebbdf4447d51a43093d27c3a1016b6f661dc24fa8 /src/mesa/main/attrib.c
parent2efa86ea3040c37965987160733b22e2a0541a3e (diff)
mesa: replace old MEMCPY macro with memcpy
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 881644cdaf2..44dc3b871ec 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 );