Closed
Bug 838995
Opened 11 years ago
Closed 11 years ago
Improve performance when reading back textures
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: tzimmermann, Assigned: tzimmermann)
Details
(Whiteboard: [fixed-in-birch])
Attachments
(3 files, 2 obsolete files)
Using oprofile, I did some profiling of the Crystal Skull app on FFOS. I found that it spends around 10% of the time in libxul.so, and 40% of that time in the function SwapRAndBComponents, which converts images between RGBA and BGRA.
We don't actually care about this -- readback is death to begin with, and we're going to be skipping the readback entirely with bug 837591 and/or bug 716859. (However, if we do need to fix this specific issue, we should just not do SwapRAndBComponents at all -- we can do the swap for free in the final fragment shader in the compositor, we just have to tell it what the RB order is.)
Assignee | ||
Comment 2•11 years ago
|
||
I'll attach some patches and you can still decide whether to take them or not. They are already finished, so it's not much of a difference for me.
Ah ok -- if you already have patches done, no reason not to take 'em :)
Assignee | ||
Comment 4•11 years ago
|
||
Actually a patch for bug 743918, which gets fixed as a side effect. I thought it might be better to keep this a separate change.
Attachment #711229 -
Flags: review?(vladimir)
Assignee | ||
Comment 5•11 years ago
|
||
This change increase the frame rate of the Crystal Skull app from ~8 to ~10 fps, because the call to SwapRandBComponents is not necessary any more.
Attachment #711232 -
Flags: review?(vladimir)
Assignee | ||
Comment 6•11 years ago
|
||
This patch increase the performance in the (very) slow path. As a nice side effect, the code is now endian-agnostic. I think the original code only worked in little-endian machines.
Attachment #711234 -
Flags: review?(vladimir)
Assignee | ||
Comment 7•11 years ago
|
||
These are the oprofile results for the patched implementation of SwapRAndBComponents. It now takes only ~30% of the time in libxul; in stead of ~40%.
Comment on attachment 711234 [details] [diff] [review] Improve component swapping when reading texture in RGBA format Gah, apologies for forgetting about this. The SwapRAndBComponents stuff is good, no reason not to take it. The others don't apply any more as the code went away..
Attachment #711234 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #711229 -
Flags: review?(vladimir) → review-
Assignee | ||
Updated•11 years ago
|
Attachment #711232 -
Attachment is obsolete: true
Attachment #711232 -
Flags: review?(vladimir)
Assignee | ||
Updated•11 years ago
|
Attachment #711229 -
Attachment is obsolete: true
Assignee | ||
Comment 9•11 years ago
|
||
Thanks! And sorry for the delay here. I've been busy with other stuff.
Assignee | ||
Comment 10•11 years ago
|
||
http://hg.mozilla.org/projects/birch/rev/492e19f9dd98
Assignee | ||
Updated•11 years ago
|
Whiteboard: [fixed-in-birch]
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/492e19f9dd98
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•