When comparing the pixel colours from glClear and normal rendering it was found that the same colour differed by one pixel value. This was found to be caused by glClear (in s_buffers.c, function clear_rgba_buffer) using the macro FLOAT_TO_USHORT which truncates while the normal rendering pipeline (in t_vertex_generic.c) uses the macro UNCLAMPED_FLOAT_TO_USHORT which rounds. So for a pixel value expected to be 2.52 the glClear calculated 2 and the rendering pipeline calculated 3. This was resolved simply resolved by substituting the latted macro in the glClear case. Therefore the lines 135 to 138 were changed to UNCLAMPED_FLOAT_TO_USHORT(clear16[0], ctx->Color.ClearColor[0]); UNCLAMPED_FLOAT_TO_USHORT(clear16[1], ctx->Color.ClearColor[1]); UNCLAMPED_FLOAT_TO_USHORT(clear16[2], ctx->Color.ClearColor[2]); UNCLAMPED_FLOAT_TO_USHORT(clear16[3], ctx->Color.ClearColor[3]); This resolved the problem for this specific instance.
Fixed in CVS. Thanks.
Mass version move, cvs -> git
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.