diff options
author | Brian Paul <[email protected]> | 2005-10-04 14:49:30 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-10-04 14:49:30 +0000 |
commit | 14c38b8f4f1f3ffaf955fb4de4cb36a5f10d2bb2 (patch) | |
tree | 6f5ae0ec4161ebbe2faa165fe381a00c93ba6439 /src/mesa/swrast/s_texstore.c | |
parent | eb063cfa386ccf64e01be2fc6e6a44f702d19da5 (diff) |
Use Visual.depthBits rather than Renderbuffer::DepthBits for depth buffer
operations.
Diffstat (limited to 'src/mesa/swrast/s_texstore.c')
-rw-r--r-- | src/mesa/swrast/s_texstore.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c index fce20011d2a..c0da83eb9fe 100644 --- a/src/mesa/swrast/s_texstore.c +++ b/src/mesa/swrast/s_texstore.c @@ -164,13 +164,13 @@ read_depth_stencil_image(GLcontext *ctx, GLint x, GLint y, } /* put depth values into bits 0xffffff00 */ - if (depthRb->DepthBits == 24) { + if (ctx->ReadBuffer->Visual.depthBits == 24) { GLint j; for (j = 0; j < width * height; j++) { image[j] <<= 8; } } - else if (depthRb->DepthBits == 16) { + else if (ctx->ReadBuffer->Visual.depthBits == 16) { GLint j; for (j = 0; j < width * height; j++) { image[j] = (image[j] << 16) | (image[j] & 0xff00); @@ -178,8 +178,8 @@ read_depth_stencil_image(GLcontext *ctx, GLint x, GLint y, } else { /* this handles arbitrary depthBits >= 12 */ - GLint lShift = 32 - depthRb->DepthBits; - GLint rShift = depthRb->DepthBits; + const GLint rShift = ctx->ReadBuffer->Visual.depthBits; + const GLint lShift = 32 - rShift; GLint j; for (j = 0; j < width * height; j++) { GLuint z = (image[j] << lShift); |