Bug 102060

Summary: Optimize RGB565 and RGBA5551 packing/unpacking functions with NEON intrinsics
Product: WebKit Reporter: Gabor Rapcsanyi <rgabor>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot, zherczeg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch
none
patch_v2 none

Description Gabor Rapcsanyi 2012-11-13 01:47:48 PST
Optimize RGB565 and RGBA5551 packing/unpacking functions with NEON intrinsics
Comment 1 Gabor Rapcsanyi 2012-11-13 02:32:37 PST
Created attachment 173853 [details]
proposed patch

I tried it on Pandaboard with Linaro 12.10 Ubuntu.

unpackOneRowOfRGB565ToRGBA8: 2.69x faster
packOneRowOfRGBA8ToUnsignedShort565: 3.37x faster

unpackOneRowOfRGBA5551ToRGBA8: 3.2x faster
packOneRowOfRGBA8ToUnsignedShort5551: 3.31x faster
Comment 2 Zoltan Herczeg 2012-11-13 02:49:05 PST
Comment on attachment 173853 [details]
proposed patch

Nice job, just a minor comment:

View in context: https://bugs.webkit.org/attachment.cgi?id=173853&action=review

> Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h:84
> +    uint8x8_t constant1 = vdup_n_u8(0x7);
> +    uint8x8_t constant2 = vdup_n_u8(0xFF);
> +    uint16x8_t constant3 = vdupq_n_u16(0x1F);
> +    uint16x8_t constant4 = vdupq_n_u16(0x1);

These indexes are not nice. I would prefer immediate0x7, immediate0xff, ....
Comment 3 Gabor Rapcsanyi 2012-11-13 04:39:52 PST
Created attachment 173863 [details]
patch_v2

Fixed patch.
Comment 4 Zoltan Herczeg 2012-11-13 04:51:45 PST
Comment on attachment 173863 [details]
patch_v2

r=me
Comment 5 WebKit Review Bot 2012-11-13 05:21:08 PST
Comment on attachment 173863 [details]
patch_v2

Rejecting attachment 173863 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
estExpectations
Auto-merging Tools/ChangeLog
CONFLICT (content): Merge conflict in Tools/ChangeLog
Failed to merge in the changes.
Patch failed at 0001 Unreviewed Qt gardening.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

rebase refs/remotes/origin/master: command returned error: 1

Died at Tools/Scripts/update-webkit line 154.

Full output: http://queues.webkit.org/results/14813779
Comment 6 Gabor Rapcsanyi 2012-11-13 05:50:50 PST
I have landed manually:
http://trac.webkit.org/changeset/134403