Track 3D/2D_ARRAY texture data invalidation by-slice
Categories
(Core :: Graphics: CanvasWebGL, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | fixed |
People
(Reporter: jgilbert, Assigned: greyson.gilbert.oss)
Details
Attachments
(1 file)
Currently, if you create (e.g.) a 2D_ARRAY texture and populate it slice-by-slice, you get this warning when populating (clear, (copy)texSubImage, blitFramebuffer) the first slice:
Error: WebGL warning: texSubImage3D: Texture has not been initialized prior to a partial upload, forcing the browser to clear it. This may be slow.
Now, when we resolve a texture as complete for drawing, we'll need to ensure that all slices either have been populated, or clear them ourselves. However, we should expect well-behaved apps to have populated all the slices, and if they don't we should definitely issue a warning.
The max-sizes here are medium sized, about 2k-4k.
https://webglstats.com/webgl2/parameter/MAX_3D_TEXTURE_SIZE
https://webglstats.com/webgl2/parameter/MAX_ARRAY_TEXTURE_LAYERS
https://opengles.gpuinfo.org/displaycapability.php?name=GL_MAX_3D_TEXTURE_SIZE&esversion=3
https://opengles.gpuinfo.org/displaycapability.php?name=GL_MAX_ARRAY_TEXTURE_LAYERS&esversion=3
2kbits is 250bytes, so it wouldn't be so bad to store a bit-vector of some type.
| Assignee | ||
Comment 1•7 years ago
|
||
Before this patch any partial upload to a texture would incur
a zeroing of the texture first to prevent leakage of information.
The texture now tracks, for each image not fully initialized,
which z-slices have been initialized, and only zeroes the rest
of the slices when the texture is used.
| Assignee | ||
Comment 2•7 years ago
|
||
I haven't done any perf testing or big optimizations, but I wanted to make sure that the general layout of the changes is acceptable.
Comment 4•7 years ago
|
||
Backed out changeset ac0666e2b27c (Bug 1564293) for build bustages on WebGLFramebuffer.cpp:883:26.
Backout: https://hg.mozilla.org/integration/autoland/rev/92bf952f1bc9fb7141615f4bbd6202b083221843
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&revision=ac0666e2b27c5a842610e423d74f6f318e42230c&selectedJob=258459162
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=258459162&repo=autoland&lineNumber=27510
| Reporter | ||
Updated•7 years ago
|
| Reporter | ||
Comment 5•7 years ago
|
||
Well, I'm not a fan of that being a -Werror, but I suppose it does make the copy clear. (Though in this case, I would generally prefer const auto& to say "whatever's most efficient")
Comment 7•7 years ago
|
||
| bugherder | ||
Description
•