Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2441)

Issue 4465052: Use SSE2 to swizzle RGBA to BGRA (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by John Bauman
Modified:
12 years, 11 months ago
Reviewers:
dgkoch, nicolas
CC:
angleproject-review_googlegroups.com
Base URL:
https://angleproject.googlecode.com/svn/trunk
Visibility:
Public.

Description

Use SSE2 to swizzle RGBA to BGRA Using SSE2 can drastically reduce the amount of time it takes to do glTexImage2D. I've also added a plain-C path that's much faster than the one that was there before. BUG=151 TEST= Committed: http://code.google.com/p/angleproject/source/detail?r=649

Patch Set 1 #

Patch Set 2 : fix whitespace #

Patch Set 3 : switch to _rotl, use set1_epi32 #

Patch Set 4 : move SSE2 check function #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -10 lines) Patch
M src/libGLESv2/Texture.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/libGLESv2/Texture.cpp View 1 2 3 3 chunks +58 lines, -10 lines 0 comments Download
M src/libGLESv2/mathutil.h View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 8
John Bauman
12 years, 11 months ago (2011-05-06 02:34:55 UTC) #1
nicolas
You could also use a rotate instruction: abgr = (_rotl(argb, 16) & 0x00FF00FF) | (argb ...
12 years, 11 months ago (2011-05-06 07:09:57 UTC) #2
John Bauman
On 2011/05/06 07:09:57, nicolas wrote: > You could also use a rotate instruction: > > ...
12 years, 11 months ago (2011-05-06 09:26:25 UTC) #3
nicolas
Ok, the patch looks fine to me.
12 years, 11 months ago (2011-05-09 13:33:00 UTC) #4
John Bauman
Actually, I changed my mind about using _rotl (might as well reduce cycles as much ...
12 years, 11 months ago (2011-05-10 19:37:59 UTC) #5
nicolas
Could you move supportsSSE2() to mathutil.h? It can become useful outside of Texture.cpp as well... ...
12 years, 11 months ago (2011-05-11 13:41:19 UTC) #6
John Bauman
Ok, moved the function around. Although, hopefully we won't have to add too much more ...
12 years, 11 months ago (2011-05-12 00:47:24 UTC) #7
dgkoch
12 years, 11 months ago (2011-05-12 18:54:40 UTC) #8
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b