Closed Bug 1082248 Opened 10 years ago Closed 10 years ago

Skip redundant deferred texture image initialization when doing full-image updates

Categories

(Core :: Graphics: CanvasWebGL, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: bjacob, Assigned: bjacob)

References

Details

Attachments

(1 file)

bjacob>       jgilbert: while writing this patch, i ran across an optimization opportunity that just changed from "not important" to "very important"
jgilbert>     oh?
bjacob>       jgilbert: if you have a texture with uninitializated image data, and you do a texSubImage on it, that triggers the "deferred initialization" code, which will initialize it using either a glClear or calloc+upload if glClear is not applicable. It's potentially expensive either way.
oin   jrmuizel (jrmuizel@moz-171v0n.cable.rogers.com) has joined this channel.
ode   ChanServ gives channel operator privileges to jrmuizel.
bjacob>       jgilbert: that used not to matter much, because that was an uncommon usage pattern,
ick   Callek_disconnected is now known as Callek.
bjacob>       jgilbert: but now with texStorage+texSubImage that becomes the standard usage pattern --- and even the *only* one for 3d textures
jgilbert>     right
jgilbert>     we need to special-case full-image texSubImages
bjacob>       jgilbert: so the easy optimization to do here is, if texSubImage is covering the whole image, skip deferred init
bjacob>       exactrly
jgilbert>     yep, definitely
bjacob>       jgilbert: writing patch (just a few lines)
jgilbert>     yeah, it should be
Attachment #8504403 - Flags: review?(jgilbert)
Attachment #8504403 - Flags: review?(jgilbert) → review+
Had a simple mistake; not worth another review cycle, new try:
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=2b0ab8963141
https://hg.mozilla.org/mozilla-central/rev/1e5f45339d3f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Blocks: 1071335
You need to log in before you can comment on or make changes to this bug.