diff options
author | Brian Paul <[email protected]> | 2011-11-23 10:36:16 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-11-28 08:04:48 -0700 |
commit | 858d1f0b1cb9087f7eefcb3b8147e06457505ce0 (patch) | |
tree | 81f2aad910af3f1a52f476529dada8fc2a2333de /src/mesa/main/format_unpack.c | |
parent | ee47e19738356c2c97a40c5306769b0f7445c32e (diff) |
mesa: fix indexing error in unpack_Z32_FLOAT_X24S8()
The source array elements are 8-bytes (float + uint) so we need
to multiply the src index by 2 to get the right array stride.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/format_unpack.c')
-rw-r--r-- | src/mesa/main/format_unpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 2d2e6a86819..0ab6940144b 100644 --- a/src/mesa/main/format_unpack.c +++ b/src/mesa/main/format_unpack.c @@ -661,7 +661,7 @@ unpack_Z32_FLOAT(const void *src, GLfloat dst[][4], GLuint n) for (i = 0; i < n; i++) { dst[i][0] = dst[i][1] = - dst[i][2] = s[i]; + dst[i][2] = s[i * 2]; dst[i][3] = 1.0F; } } |