aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-17 13:46:47 +0100
committerMarc Haesen <marc@hc-consult.be>2011-12-17 13:46:47 +0100
commitcd55591be471b59faf9693651837a61e8376d85a (patch)
treedaa8bcdb500384d7112f5114bf9c11b0bc2ab78d /mesalib/src/mesa/swrast/s_drawpix.c
parent1ae4005bfe3690b34ec40e33918b3e24468d47e1 (diff)
parentabacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (diff)
downloadvcxsrv-cd55591be471b59faf9693651837a61e8376d85a.tar.gz
vcxsrv-cd55591be471b59faf9693651837a61e8376d85a.tar.bz2
vcxsrv-cd55591be471b59faf9693651837a61e8376d85a.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/swrast/s_drawpix.c')
-rw-r--r--mesalib/src/mesa/swrast/s_drawpix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesalib/src/mesa/swrast/s_drawpix.c b/mesalib/src/mesa/swrast/s_drawpix.c
index b6c433753..7259881c1 100644
--- a/mesalib/src/mesa/swrast/s_drawpix.c
+++ b/mesalib/src/mesa/swrast/s_drawpix.c
@@ -625,7 +625,8 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
GL_DEPTH_STENCIL_EXT, type, i, 0);
if (ctx->Depth.Mask) {
- if (!scaleOrBias && ctx->DrawBuffer->Visual.depthBits == 24) {
+ if (!scaleOrBias && ctx->DrawBuffer->Visual.depthBits == 24 &&
+ type == GL_UNSIGNED_INT_24_8) {
/* fast path 24-bit zbuffer */
GLuint zValues[MAX_WIDTH];
GLint j;
@@ -639,7 +640,8 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
else
depthRb->PutRow(ctx, depthRb, width, x, y + i, zValues,NULL);
}
- else if (!scaleOrBias && ctx->DrawBuffer->Visual.depthBits == 16) {
+ else if (!scaleOrBias && ctx->DrawBuffer->Visual.depthBits == 16 &&
+ type == GL_UNSIGNED_INT_24_8) {
/* fast path 16-bit zbuffer */
GLushort zValues[MAX_WIDTH];
GLint j;