diff options
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_fragprog_common.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.c | 3 | ||||
-rw-r--r-- | src/mesa/main/bitset.h | 2 | ||||
-rw-r--r-- | src/mesa/main/imports.c | 11 | ||||
-rw-r--r-- | src/mesa/main/imports.h | 3 | ||||
-rw-r--r-- | 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 a0e2dd3c09f..f3d8f2f4244 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 efdcdb78486..a74b7001dd9 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 29468e84861..9f48b3cceab 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 d8375bf5727..67305002258 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 68d2043c916..d5ab7cdc206 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 35a2cebab82..f790fd6562e 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). */ |