diff options
author | Brian Paul <[email protected]> | 2010-02-19 08:32:36 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-02-19 08:32:36 -0700 |
commit | 6bf1ea897fa470af58fe8916dff45e2da79634a3 (patch) | |
tree | 109ffe421325506019e5d8007bd6d4a9459619eb /src/mesa/swrast | |
parent | 2240ba10f30315410bcff77e372ee71664ac4453 (diff) |
mesa: replace _mesa_bzero() with memset()
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_depth.c | 16 | ||||
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_span.c | 4 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 36c8db21072..3e36cf9a7e5 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -259,7 +259,7 @@ depth_test_span16( GLcontext *ctx, GLuint n, } break; case GL_NEVER: - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in depth_test_span16"); @@ -488,7 +488,7 @@ depth_test_span32( GLcontext *ctx, GLuint n, } break; case GL_NEVER: - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in depth_test_span32"); @@ -844,7 +844,7 @@ direct_depth_test_pixels16(GLcontext *ctx, GLushort *zStart, GLuint stride, break; case GL_NEVER: /* depth test never passes */ - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in direct_depth_test_pixels"); @@ -1090,7 +1090,7 @@ direct_depth_test_pixels32(GLcontext *ctx, GLuint *zStart, GLuint stride, break; case GL_NEVER: /* depth test never passes */ - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in direct_depth_test_pixels"); @@ -1260,7 +1260,7 @@ _swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb, if (!rb) { /* really only doing this to prevent FP exceptions later */ - _mesa_bzero(depth, n * sizeof(GLfloat)); + memset(depth, 0, n * sizeof(GLfloat)); return; } @@ -1269,7 +1269,7 @@ _swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb, if (y < 0 || y >= (GLint) rb->Height || x + n <= 0 || x >= (GLint) rb->Width) { /* span is completely outside framebuffer */ - _mesa_bzero(depth, n * sizeof(GLfloat)); + memset(depth, 0, n * sizeof(GLfloat)); return; } @@ -1326,7 +1326,7 @@ _swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb, if (!rb) { /* really only doing this to prevent FP exceptions later */ - _mesa_bzero(depth, n * sizeof(GLuint)); + memset(depth, 0, n * sizeof(GLuint)); return; } @@ -1337,7 +1337,7 @@ _swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb, if (y < 0 || y >= (GLint) rb->Height || x + n <= 0 || x >= (GLint) rb->Width) { /* span is completely outside framebuffer */ - _mesa_bzero(depth, n * sizeof(GLfloat)); + memset(depth, 0, n * sizeof(GLfloat)); return; } diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index d31da4c4022..7c1de62e878 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -148,8 +148,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine, if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { /* Clear temporary registers (undefined for ARB_f_p) */ - _mesa_bzero(machine->Temporaries, - MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + memset(machine->Temporaries, 0, MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); } /* ARB_fragment_coord_conventions */ diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 7087f25d274..dada3643606 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1579,7 +1579,7 @@ _swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb, if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) { /* completely above, below, or right */ /* XXX maybe leave rgba values undefined? */ - _mesa_bzero(rgba, 4 * n * sizeof(GLchan)); + memset(rgba, 0, 4 * n * sizeof(GLchan)); } else { GLint skip, length; @@ -1642,7 +1642,7 @@ _swrast_read_index_span( GLcontext *ctx, struct gl_renderbuffer *rb, if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) { /* completely above, below, or right */ - _mesa_bzero(index, n * sizeof(GLuint)); + memset(index, 0, n * sizeof(GLuint)); } else { GLint skip, length; |