aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-03-18 18:44:51 +0800
committerXiang, Haihao <[email protected]>2007-03-18 18:44:51 +0800
commitbb02092d749ff9d58a13fd99f66154504b4f3dd1 (patch)
tree31071b42d9d515ab9f41e1cfec80f04538758966 /src/mesa/swrast/s_drawpix.c
parentb6fe1bdd4da806895f90f3f5be4fb364d6f1f64a (diff)
mesa: SWAP_BUFF support when calling DrawPixels(DEPTH_COMPONENT)
or TexImage(DEPTH_COMPONENT)
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r--src/mesa/swrast/s_drawpix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index d945a871aed..d97d53e83b4 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -452,7 +452,8 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
&& !scaleOrBias
&& !zoom
&& ctx->Visual.rgbMode
- && width <= MAX_WIDTH) {
+ && width <= MAX_WIDTH
+ && !unpack->SwapBytes) {
/* Special case: directly write 16-bit depth values */
GLint row;
for (row = 0; row < height; row++) {
@@ -472,7 +473,8 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
&& !scaleOrBias
&& !zoom
&& ctx->Visual.rgbMode
- && width <= MAX_WIDTH) {
+ && width <= MAX_WIDTH
+ && !unpack->SwapBytes) {
/* Special case: shift 32-bit values down to Visual.depthBits */
const GLint shift = 32 - ctx->DrawBuffer->Visual.depthBits;
GLint row;