From: J.P. D. <jpd...@cs...> - 2001-06-15 13:25:13
|
Brian Paul wrote: > > "J.P. Delport" wrote: > > > I also did some GLchan fixes in read/write_rgba_span_rgba in osmesa.c > > > > The functions appear to work correctly for 16 bit/channel (and should > > for 32 bit). They follow at the bottom. I don't know if the ASSERT in > > the write function can be removed completely. > > This is incorrect. The write_rgba_span_rgba() function will only work > correctly for 8-bit channels. The reason is we're using a GLuint to > store 4 8-bit channels at once as a dword. By storing 4 bytes at once > (without any swizzling) we can get slightly better performance. But > if we're storing > 4 bytes or need swizzling, we need to use the slower > write_rgba_span() function. Sorry, I missed the idea behind the use of the GLint. Still, the case for CHAN_BITS=16 with no swizzling is also a special case and could be made faster by using MEMCPY, escpecially when there is no mask. Also: in the function write_rgb_span the alpha values passed to PACK_RGBA are 255??? jp |