summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-11-04 17:42:30 -0700
committerBrian Paul <[email protected]>2009-11-04 17:42:30 -0700
commitbc4ad7c2ae069a7d361f2210d39dbb91777cce76 (patch)
treeea82bec75df913003149dd009aed7a13dc19534b /src/mesa/main
parent76aa0c0fd3d972000cb6707a3834128cea2f9738 (diff)
mesa: fix broken pack_histogram() case for GLhalf
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/histogram.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index ceb0d5a6a86..4c46f927871 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -186,16 +186,17 @@ pack_histogram( GLcontext *ctx,
{
/* temporarily store as GLuints */
GLuint temp[4*HISTOGRAM_TABLE_SIZE];
- GLhalfARB *dst = (GLhalfARB *) destination;
+ GLuint *dst = temp;
+ GLhalfARB *half = destination;
GLuint i;
/* get GLuint values */
PACK_MACRO(GLuint);
/* convert to GLhalf */
for (i = 0; i < n * comps; i++) {
- dst[i] = _mesa_float_to_half((GLfloat) temp[i]);
+ half[i] = _mesa_float_to_half((GLfloat) temp[i]);
}
if (packing->SwapBytes) {
- _mesa_swap2((GLushort *) dst, n * comps);
+ _mesa_swap2((GLushort *) half, n * comps);
}
}
break;