Summary: | Speeding up render with gcc 3.4 and MMX intrinsics | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Søren Sandmann Pedersen <soren.sandmann> | ||||||||||
Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> | ||||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | high | CC: | ajax, duraid | ||||||||||
Version: | git | ||||||||||||
Hardware: | x86 (IA32) | ||||||||||||
OS: | Linux (All) | ||||||||||||
URL: | http://freedesktop.org/~sandmann/rpms/ | ||||||||||||
Whiteboard: | |||||||||||||
i915 platform: | i915 features: | ||||||||||||
Attachments: |
|
Description
Søren Sandmann Pedersen
2004-07-08 09:45:22 UTC
Created attachment 452 [details]
fbmmx.c
Created attachment 453 [details]
fbmmx.h
Created attachment 454 [details] [review] The patch Created attachment 455 [details]
The benchmark
Is there any particular reason why you didn't use mmintrin.h ? > Is there any particular reason why you didn't use mmintrin.h ?
Well, that file is not installed on my system.
(In reply to comment #6) > > Is there any particular reason why you didn't use mmintrin.h ? > > Well, that file is not installed on my system. I don't know how you could manage to install gcc without it's system headers; are you sure it's not in the gcc install dir? Try running the following: ls $(gcc -print-search-dirs | grep install | awk '{ print $2 }')/include/*intrin.h Yeah, I got the file. I'll have to change my story then to "No particular reason, I just didn't know about the file". It looks like it contains a lot of useful stuff that I duplicated in fbmmx.c. (In reply to comment #3) > Created an attachment (id=454) > The patch > Instead of surrounding all of the calls to the *mmx functions in fbpict.c with USE_GCC34_MMX why not just have fbHaveMMX() return 0 when USE_GCC34_MMX is not defined? Hi Søren, This looks like a great patch, but I'm wondering, why not change things so there's an fb_asm.c (or whatever) which appropriately #includes another source file with the MMX code? This would make things cleaner for other people who want to do the same thing for other platforms (PowerPC's Altivec, IA64's multimedia instructions etc). On that note, I think the potential speed gains for text rendering will be even more significant on these other platforms, since GCC does a worse job there, and vendor-accelerated RENDER extensions (e.g. NVIDIA's) are nowhere to be seen. > Instead of surrounding all of the calls to the *mmx functions in fbpict.c with > USE_GCC34_MMX why not just have fbHaveMMX() return 0 when USE_GCC34_MMX is not > defined? The problem doing that is thew all the MMX functions are not even defined if we don't have gcc 3.4 on i386. From Duraid Madina: > This looks like a great patch, but I'm wondering, why not change things so > there's an fb_asm.c (or whatever) which appropriately #includes another source > file with the MMX code? This would make things cleaner for other people who > want That might not be a bad idea, but I'd rather wait until someone actually creates optimizations for those other platforms. The patch is committed now. |
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.