mesa: fix broken pack_histogram() case for GLhalf
This commit is contained in:
@@ -186,16 +186,17 @@ pack_histogram( GLcontext *ctx,
|
|||||||
{
|
{
|
||||||
/* temporarily store as GLuints */
|
/* temporarily store as GLuints */
|
||||||
GLuint temp[4*HISTOGRAM_TABLE_SIZE];
|
GLuint temp[4*HISTOGRAM_TABLE_SIZE];
|
||||||
GLhalfARB *dst = (GLhalfARB *) destination;
|
GLuint *dst = temp;
|
||||||
|
GLhalfARB *half = destination;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
/* get GLuint values */
|
/* get GLuint values */
|
||||||
PACK_MACRO(GLuint);
|
PACK_MACRO(GLuint);
|
||||||
/* convert to GLhalf */
|
/* convert to GLhalf */
|
||||||
for (i = 0; i < n * comps; i++) {
|
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) {
|
if (packing->SwapBytes) {
|
||||||
_mesa_swap2((GLushort *) dst, n * comps);
|
_mesa_swap2((GLushort *) half, n * comps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user