If I put 24bit RGB image with XvPutImage(), server is crashed with signal 11. This occurs only when DRI and DMA are enabled.
Created attachment 12591 [details] [review] patch for this bug.
Thanks for the patch. > - src += hpass * srcPitch; > - dptr += hpass * bufPitch; > + src += srcPitch; > + buf += bufPitch; Looks like this is the essential fix? It shouldn't be necessary to add the buf variable though. > - dptr[0]=((sptr[0])<<24)|((sptr[1])<<16)|(sptr[2]); > +#if X_BYTE_ORDER == X_BIG_ENDIAN > + dptr[0]=((sptr[0])<<16)|((sptr[1])<<8)|(sptr[2]); > +#else > + dptr[0]=((sptr[2])<<16)|((sptr[1])<<8)|(sptr[0]); > +#endif Are you sure these changes are correct for both byte orders? Is your system big or little endian?
> Looks like this is the essential fix? It shouldn't be necessary to add the buf > variable though. To add buf is necessary. I confirmed it. > Are you sure these changes are correct for both byte orders? Is your system big > or little endian? I'm not sure that this is correct for big endian. My system is little endian.
(In reply to comment #3) > To add buf is necessary. I confirmed it. Something like dptr += bufPitch / 4; should do, doesn't it? > I'm not sure that this is correct for big endian. > My system is little endian. I doubt the byte order of a 3-byte format depends on endianness directly. Do you have a testcase I can try?
Created attachment 12693 [details] [review] patch take 2 Is this better than previous one?
Created attachment 12694 [details] testcase > I doubt the byte order of a 3-byte format depends on endianness directly. Do > you have a testcase I can try? Testcase is attached. It should display red, green and blue on top, middle and bottom respectively.
Thanks for the new patch and the testcase. I'll fix it up (if necessary) on my PowerBook and push to Git when I get time.
Fixes pushed.
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.