XRenderComposite source coordinate + matrix inefficiencies
Submitted by Roderick Colenbrander
Assigned to Xorg Project Team
Description
Created attachment 27960 Test program which illustrates the issue
Hi,
Specification of source x / y coordinates in a identity transformation matrix instead of passing them to XRenderComposite is a lot slower. This is because XRender applies optimizations for identity matrices and it doesn't consider the use of x/y coordinates in the matrix as such. I think that internally XRender should be changed to put x/y coordinates in the matrix by default. At least it shouldn't be the task of the client to 'detect' this issue (in Wine I now have to add additional code to handle this which increases complexity).
Some simple tests using the attached test app on FGLRX which only has a software xrender implementation (on nvidia drivers the hit is only a factor 2 or so). 433966.985996 Ops/s; Simple Blit (!); 20x20 125044.647547 Ops/s; Simple Blit (!); 100x100 8678.437881 Ops/s; Simple Blit (!); 500x500 431653.551514 Ops/s; Simple Blit Offset (!); 20x20 125829.403664 Ops/s; Simple Blit Offset (!); 100x100 8522.315519 Ops/s; Simple Blit Offset (!); 500x500 113033.378164 Ops/s; Transformed Blit Linear (!); 20x20 6806.220993 Ops/s; Transformed Blit Linear (!); 100x100 287.979924 Ops/s; Transformed Blit Linear (!); 500x500
Thanks, Roderick Colenbrander Wine developer
Attachment 27960, "Test program which illustrates the issue":
xrender_test.c