mesa: use sizeof on the correct type

Before the luminance stride was based on the size of GL_FLOAT
which is just the type constant (0x1406). Change it to use the
size of GLfloat.

Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 1807806add)
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2016-02-22 15:58:00 -07:00 committed by Emil Velikov
parent 188e698e1a
commit 7d056d2ec9

View file

@ -582,7 +582,7 @@ read_rgba_pixels( struct gl_context *ctx,
void *luminance;
uint32_t luminance_format;
luminance_stride = width * sizeof(GL_FLOAT);
luminance_stride = width * sizeof(GLfloat);
if (format == GL_LUMINANCE_ALPHA)
luminance_stride *= 2;
luminance_bytes = height * luminance_stride;