[Mesa-dev] [PATCH] mesa: use sizeof on the correct type

Thomas H.P. Andersen phomes at gmail.com
Tue Feb 23 08:58:49 UTC 2016


On Tue, Feb 23, 2016 at 1:05 AM, Brian Paul <brianp at vmware.com> wrote:

> On 02/22/2016 03:58 PM, Thomas Hindoe Paaboel Andersen wrote:
>
>> 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.
>> ---
>>   src/mesa/main/readpix.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
>> index 470182a..882d863 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;
>>
>>
> Thanks.
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> Need me to push this for you?
>

Yes, please push it. Thanks for the fast review.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160223/77d86d7a/attachment-0001.html>


More information about the mesa-dev mailing list