diff options
author | marha <marha@users.sourceforge.net> | 2012-01-25 08:24:51 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-25 08:24:51 +0100 |
commit | e6432710d8a586386b3c7025e845cf4f80830da3 (patch) | |
tree | a403fa86779a287c97f5605f9b4d455d662ece66 /mesalib/src/mesa/swrast/s_drawpix.c | |
parent | d3f0fe49b8cb29295f3e529cc699a2abde1515a1 (diff) | |
download | vcxsrv-e6432710d8a586386b3c7025e845cf4f80830da3.tar.gz vcxsrv-e6432710d8a586386b3c7025e845cf4f80830da3.tar.bz2 vcxsrv-e6432710d8a586386b3c7025e845cf4f80830da3.zip |
mesa git update 25 jan 2012
Diffstat (limited to 'mesalib/src/mesa/swrast/s_drawpix.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_drawpix.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mesalib/src/mesa/swrast/s_drawpix.c b/mesalib/src/mesa/swrast/s_drawpix.c index 4231bb4bd..c5466ddbd 100644 --- a/mesalib/src/mesa/swrast/s_drawpix.c +++ b/mesalib/src/mesa/swrast/s_drawpix.c @@ -429,11 +429,14 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y, span.arrayMask = SPAN_RGBA; span.arrayAttribs = FRAG_BIT_COL0; /* we're fill in COL0 attrib values */ - if (ctx->DrawBuffer->_NumColorDrawBuffers > 0 && - ctx->DrawBuffer->_ColorDrawBuffers[0]->DataType != GL_FLOAT && - ctx->Color.ClampFragmentColor != GL_FALSE) { - /* need to clamp colors before applying fragment ops */ - transferOps |= IMAGE_CLAMP_BIT; + if (ctx->DrawBuffer->_NumColorDrawBuffers > 0) { + GLenum datatype = _mesa_get_format_datatype( + ctx->DrawBuffer->_ColorDrawBuffers[0]->Format); + if (datatype != GL_FLOAT && + ctx->Color.ClampFragmentColor != GL_FALSE) { + /* need to clamp colors before applying fragment ops */ + transferOps |= IMAGE_CLAMP_BIT; + } } /* @@ -510,6 +513,7 @@ fast_draw_depth_stencil(struct gl_context *ctx, GLint x, GLint y, const GLenum type = GL_UNSIGNED_INT_24_8; struct gl_renderbuffer *rb = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; + struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); GLubyte *src, *dst; GLint srcRowStride, dstRowStride; GLint i; @@ -519,7 +523,7 @@ fast_draw_depth_stencil(struct gl_context *ctx, GLint x, GLint y, srcRowStride = _mesa_image_row_stride(unpack, width, format, type); dst = _swrast_pixel_address(rb, x, y); - dstRowStride = rb->RowStride * 4; + dstRowStride = srb->RowStride; for (i = 0; i < height; i++) { _mesa_pack_uint_24_8_depth_stencil_row(rb->Format, width, |