Closed Bug 587936 Opened 14 years ago Closed 14 years ago

Add SSE2 optimizations for gfxAlphaRecovery

Categories

(Core :: Graphics, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(2 files)

I've created a codepath for gfxAlphaRecovery that uses SSE2 optimizations. On my Core i7 920 this performs at roughly 8 times the speed of the normal codepath. I've pushed it to birch to see if it properly compiles on all platforms.
Attachment #466552 - Flags: review?(vladimir)
Blocks: 551972
Comment on attachment 466552 [details] [diff] [review] Add SSE2 path for alpha recovery Looks fine to me.
Attachment #466552 - Flags: review?(vladimir) → review+
typo: "save" should be "same" in the RecoverAlphaSSE2 declaration comment
First, I didn't see crowder's a+ in this bug. I assume it was approved through another channel. It caused a crash because "!=" has precedence over "&" bit and. Also fix the Makefile.in for Sun Studio. And replace tabs with white spaces.
Attachment #466969 - Flags: review?(vladimir)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment on attachment 466969 [details] [diff] [review] fix a crash and compile issue with Sun Studio Not sure what crowder's approval has anything to do with this bug. Didn't see the tabs though, wish bugzilla would call that out :/
Attachment #466969 - Flags: review?(vladimir) → review+
(In reply to comment #5) > Comment on attachment 466969 [details] [diff] [review] > fix a crash and compile issue with Sun Studio > > Not sure what crowder's approval has anything to do with this bug. Didn't see > the tabs though, wish bugzilla would call that out :/ I think what he ment is I forgot to have Joe set it blocking2.0. Although it was blocking a bug that's blocking2.0, but I don't think that counts. Technically.
I found a typo - "ifndef MOZ_ENABLE_LIBXUL" Shouldn't it be "ifdef" like the rest?
Comment on attachment 466969 [details] [diff] [review] fix a crash and compile issue with Sun Studio This patch is required to fix a crash.
Attachment #466969 - Flags: approval2.0?
(In reply to comment #7) > I found a typo - "ifndef MOZ_ENABLE_LIBXUL" > > Shouldn't it be "ifdef" like the rest? Are you talking about this bug?
(In reply to comment #9) > (In reply to comment #7) > > I found a typo - "ifndef MOZ_ENABLE_LIBXUL" > > > > Shouldn't it be "ifdef" like the rest? > > Are you talking about this bug? Yes I was talking about the attachment, "fix a crash and compile issue with Sun Studio". I thought it was a typo. ;-)
(In reply to comment #10) > Yes I was talking about the attachment, "fix a crash and compile issue with Sun > Studio". I thought it was a typo. ;-) The patch didn't change the line "ifndef MOZ_ENABLE_LIBXUL". And I think it should be "ifndef MOZ_ENABLE_LIBXUL" there.
Comment on attachment 466969 [details] [diff] [review] fix a crash and compile issue with Sun Studio OH MY GOODNESS get this in. :)
Attachment #466969 - Flags: approval2.0? → approval2.0+
> ifeq (86,$(findstring 86,$(OS_TEST))) > ifdef __GNUC__ > gfxAlphaRecovery.$(OBJ_SUFFIX): MODULE_OPTIMIZE_FLAGS += -msse2 > endif FYI, this is rather dangerous. Setting -msse2 gives GCC permission to use sse2 instructions in the file wherever it pleases, even outside your CPUID guard. I'm not sure if recent versions of GCC will add SSE instructions at -Os (which is what we're currently using on Linux), but I know it will at -O3, which is what we're switching to in the near future. The only correct way that I'm aware of to use SSE intrinsics with GCC is to place them in a separate file. I'm writing a patch to fix this as part of bug 585708.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: