Re: [Mesa-dev] [PATCH] swrast: fix readpix clamping

2011-04-21 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/20/2011 03:57 AM, Marek Olšák wrote: > Broken with e5c6a92a12b5cd7db205d72039f58d302b0be9d5. (ARB_color_buffer_float) > > Clamping should occur if type != float, otherwise the MSBs of the resulting > pixels are killed off. For example, reading b

[Mesa-dev] [PATCH] swrast: fix readpix clamping

2011-04-20 Thread Marek Olšák
Broken with e5c6a92a12b5cd7db205d72039f58d302b0be9d5. (ARB_color_buffer_float) Clamping should occur if type != float, otherwise the MSBs of the resulting pixels are killed off. For example, reading back LUMIMANCE = R+G+B can be greater than 0xff, but the result is naturally masked by 0xff for UNS