diff options
author | Brian <[email protected]> | 2007-08-02 09:08:53 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-02 09:08:53 -0600 |
commit | 2f682c3995dcf7eb05b68f79a63090c1473d5db1 (patch) | |
tree | 4f8518903877c030b4040189f09f425dc84d6fd6 /src/mesa/main | |
parent | 067370e68fde59eee0e81edbae848742abe8e3e5 (diff) |
fix stencil value masking bug 11805, and fix sizeof() bug
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/image.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 0bc5803f9d4..803f4785c0a 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.1 + * Version: 7.0.1 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -3733,7 +3733,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, switch (dstType) { case GL_UNSIGNED_BYTE: - if (sizeof(GLstencil) == 8) { + if (sizeof(GLstencil) == 1) { _mesa_memcpy( dest, source, n ); } else { @@ -3745,14 +3745,11 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, } break; case GL_BYTE: - if (sizeof(GLstencil) == 8) { - _mesa_memcpy( dest, source, n ); - } - else { + { GLbyte *dst = (GLbyte *) dest; GLuint i; for (i=0;i<n;i++) { - dst[i] = (GLbyte) source[i]; + dst[i] = (GLbyte) (source[i] & 0x7f); } } break; |