summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2016-02-22 15:58:00 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2016-02-29 11:41:20 +0000
commit7d056d2ec9b3717cad09d6694d920033fa30edad (patch)
tree5b36dc217d5734eeb36af1d59648fa9bd4635c0b
parent188e698e1a6f0d7c822e13e67ff6c1ea973c3ec4 (diff)
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 1807806add36327ba1e713c49554b61b2855d5f9) Nominated-by: Emil Velikov <emil.velikov@collabora.com>
-rw-r--r--src/mesa/main/readpix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 470182ab23d..882d863c1c7 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -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;