Mesa (mesa_7_5_branch): mesa: Fix draw_stencil_pixels for PIPE_FORMAT_Z24S8_UNORM.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Jun 10 12:05:08 PDT 2009


Module: Mesa
Branch: mesa_7_5_branch
Commit: 0a4fcabe4451af6472245e2630f8c8834aa9d351
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a4fcabe4451af6472245e2630f8c8834aa9d351

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed Jun 10 19:58:54 2009 +0100

mesa: Fix draw_stencil_pixels for PIPE_FORMAT_Z24S8_UNORM.

Reversed component order.

This fixes glean depthStencil test failures for PIPE_FORMAT_Z24S8_UNORM
visuals.

---

 src/mesa/state_tracker/st_cb_drawpixels.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 89725cf..d92d29e 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -718,7 +718,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
                   uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4);
                   GLint k;
                   for (k = 0; k < spanWidth; k++) {
-                     dest[k] = zValues[k] | (sValues[k] << 24);
+                     dest[k] = (zValues[k] << 8) | (sValues[k] & 0xff);
                   }
                }
                else {



More information about the mesa-commit mailing list