summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-04 13:16:13 -0600
committerBrian Paul <brianp@vmware.com>2009-06-04 13:16:13 -0600
commit9d58724c51c387c360d2423e29b80ddc0bfa66b7 (patch)
tree774f69454bca802e1fe8e20ebb2a130843ca8123 /src/gallium/auxiliary/util
parent81a0ef3f2068448a8b544826eaa7d3382b9c769b (diff)
parent9424d81d18770f0c436f0876dffe07cf7c094db4 (diff)
Merge branch 'mesa_7_5_branch'
Conflicts: src/mesa/main/context.c
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_tile.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index f0a5a339eb..9747a55cbf 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -1126,7 +1126,22 @@ pipe_get_tile_z(struct pipe_transfer *pt,
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
/* convert 24-bit Z to 32-bit Z */
- pDest[j] = (ptrc[j] << 8) | (ptrc[j] & 0xff);
+ pDest[j] = (ptrc[j] << 8) | ((ptrc[j] >> 16) & 0xff);
+ }
+ pDest += dstStride;
+ ptrc += pt->stride/4;
+ }
+ }
+ break;
+ case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ {
+ const uint *ptrc
+ = (const uint *)(map + y * pt->stride + x*4);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w; j++) {
+ /* convert 24-bit Z to 32-bit Z */
+ pDest[j] = (ptrc[j] & 0xffffff00) | ((ptrc[j] >> 24) & 0xff);
}
pDest += dstStride;
ptrc += pt->stride/4;