diff options
author | marha <marha@users.sourceforge.net> | 2011-11-17 16:37:26 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-17 16:37:26 +0100 |
commit | d41bc08d1ae8c4784c09d8977816c0fadab1ba52 (patch) | |
tree | 4dc3081a9af0316eeee02356a44fcc2419e1b15e /mesalib/src/mesa/swrast/s_drawpix.c | |
parent | 156e37d3879b316329e3e05579414031da2647e2 (diff) | |
download | vcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.tar.gz vcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.tar.bz2 vcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.zip |
xserver mesa git update 17 nov 2011
Diffstat (limited to 'mesalib/src/mesa/swrast/s_drawpix.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_drawpix.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mesalib/src/mesa/swrast/s_drawpix.c b/mesalib/src/mesa/swrast/s_drawpix.c index 20bf4d626..b6c433753 100644 --- a/mesalib/src/mesa/swrast/s_drawpix.c +++ b/mesalib/src/mesa/swrast/s_drawpix.c @@ -320,6 +320,7 @@ draw_stencil_pixels( struct gl_context *ctx, GLint x, GLint y, const GLvoid *pixels ) { const GLboolean zoom = ctx->Pixel.ZoomX != 1.0 || ctx->Pixel.ZoomY != 1.0; + const GLenum destType = GL_UNSIGNED_BYTE; GLint skipPixels; /* if width > MAX_WIDTH, have to process image in chunks */ @@ -330,9 +331,7 @@ draw_stencil_pixels( struct gl_context *ctx, GLint x, GLint y, GLint row; for (row = 0; row < height; row++) { const GLint spanY = y + row; - GLstencil values[MAX_WIDTH]; - GLenum destType = (sizeof(GLstencil) == sizeof(GLubyte)) - ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT; + GLubyte values[MAX_WIDTH]; const GLvoid *source = _mesa_image_address2d(unpack, pixels, width, height, GL_STENCIL_INDEX, type, @@ -570,8 +569,7 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, = ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0; const GLuint depthMax = ctx->DrawBuffer->_DepthMax; const GLuint stencilMask = ctx->Stencil.WriteMask[0]; - const GLuint stencilType = (STENCIL_BITS == 8) ? - GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT; + const GLenum stencilType = GL_UNSIGNED_BYTE; const GLboolean zoom = ctx->Pixel.ZoomX != 1.0 || ctx->Pixel.ZoomY != 1.0; struct gl_renderbuffer *depthRb, *stencilRb; struct gl_pixelstore_attrib clippedUnpack = *unpack; @@ -672,7 +670,7 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, } if (stencilMask != 0x0) { - GLstencil stencilValues[MAX_WIDTH]; + GLubyte stencilValues[MAX_WIDTH]; /* get stencil values, with shift/offset/mapping */ _mesa_unpack_stencil_span(ctx, width, stencilType, stencilValues, type, depthStencilSrc, &clippedUnpack, |