mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
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:
parent
188e698e1a
commit
7d056d2ec9
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue