I noticed segfaults (glblur) and even hardware lockups (readpix) when a 3D window is partly covered by another window and _generic_read_RGBA_span_RGB565_MMX is used for reading pixels from the frame buffer. I tested this with the Savage driver. The problem disappears when I define MESA_NO_ASM=1 in the environment. I suspect there is a problem with cliprect handling. I am using Metacity with the Industrial theme, so windows have rounded corners. Therefore there are more than two cliprects and some of them may be very small in one or both dimension.
*** Bug 2393 has been marked as a duplicate of this bug. ***
Created attachment 2018 [details] [review] Fixes problems in assembly code with negative pixel counts I don't have any hardware setup where I can actually test this patch. It builds, and I believe that it should work. I'd be interested to see how the performance of this patch differs from the other proposed patch that was posted to the mailing list (but should be in the bugzilla!).
This did not compile for me, unless I replaced the "jlt" with a "jle"... This does fix the readpix segfaults as expected. Some readpix performance numbers (btw there are lots of performance anomalies, I'll comment on those in a different bug). Numbers obtained on a radeon 7200sdr (converted to use spantmp2), celeron Tualatin 1.33Ghz, i440BX (133Mhz FSB, AGP 2x, AGP running at 89Mhz instead of 66Mhz so don't take the absolute values too seriously). original: sse: 8.28 MPix/s mmx: 8.49 MPix/s generic: 1.50 MPix/s with only clipspan changes: sse: 8.24 MPix/s mmx: 8.50 MPix/s generic: 1.49 MPix/s with only optizmed assembly changes: sse: 8.30 MPix/s mmx: 8.54 MPix/s Needless to say, neither of these changes make any difference whatsoever in performance (probably not with any reasonably fast system). That said, I like this patch better (though you could probably make an argument to apply them both), since the behaviour of the optimized and unoptimized functions will be the same even when provided with not really reasonable input.
*** Bug 2229 has been marked as a duplicate of this bug. ***
Fix commited to cvs, tested on r200 only with readpix moving below left/bottom edge.
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.