diff options
author | Brian Paul <brianp@vmware.com> | 2013-01-03 08:04:50 -0700 |
---|---|---|
committer | Andreas Boll <andreas.boll.dev@gmail.com> | 2013-02-13 18:46:39 +0100 |
commit | af41a1d49107f5020bfceda8ea930601bb6b92b9 (patch) | |
tree | 30819ed8162db126a41cf6d05ef9678613b72ba9 | |
parent | 3a39c3cb678e2b41b6d2edd4fe0ba8c6c381b614 (diff) | |
download | mesa3d-af41a1d49107f5020bfceda8ea930601bb6b92b9.tar.gz |
util: fix addressing bug in pipe_put_tile_z() for PIPE_FORMAT_Z32_FLOAT
The Z32 pixel is 4 bytes so multiply x by 4, not 2.
Note: This is a candidate for the stable branches.
(cherry picked from commit 69c2528b8374156adc45c427faaa59cee88a6541)
-rw-r--r-- | src/gallium/auxiliary/util/u_tile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c index 48e73c40ba7..a1d55adf7ad 100644 --- a/src/gallium/auxiliary/util/u_tile.c +++ b/src/gallium/auxiliary/util/u_tile.c @@ -810,7 +810,7 @@ pipe_put_tile_z(struct pipe_context *pipe, break; case PIPE_FORMAT_Z32_FLOAT: { - float *pDest = (float *) (map + y * pt->stride + x*2); + float *pDest = (float *) (map + y * pt->stride + x*4); for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { /* convert 32-bit integer Z to float Z */ |