gecko-dev/gfx
Jamie Nicol e9869b1c8f Bug 1720169 - Pack instance data for multiple draw calls in to large fixed-size VBOs. r=gfx-reviewers,nical
Currently each VAO owns its own VBO for per-instance array data. Prior
to submitting each draw call that instance buffer is orphaned and a
new one allocated at exactly the right size to contain the batch's
data. This frequent reallocation appears to cause a rendering glitch
on some Adreno 4xx devices, likely due to a bug in the driver's
internal allocation/recycling code. It can also be expensive on some
devices, as the drivers struggle with the overheads of allocating many
small buffers much more than the cost of actually transferring the
data.

This patch makes it so that the VAOs no longer own an instance buffer
each. Instead, they share a pool of buffers. This pool always
allocates buffers large enough to hold the largest batch we
allow. update_vao_instances() now writes data to the pool's current
buffer until that buffer is full, and then either an old one will be
recycled or a new one allocated. After writing to the buffer it must
be bound to the VAO at the correct offset, and then the draw call is
submitted.

By manually managing the buffer lifecycles ourselves we avoid the
glitches on Adreno 4xx, and also improve performance on some devices.

Differential Revision: https://phabricator.services.mozilla.com/D121104
2021-08-03 15:47:35 +00:00
..
2d Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi 2021-07-29 23:38:31 +00:00
angle Backed out 2 changesets (bug 1717151) for Crashtest failures in dom/media/gmp/GMPServiceParent.cpp. CLOSED TREE 2021-08-03 01:56:11 +03:00
cairo Bug 1721962 - Switch to pkg-config for X11 libraries. r=firefox-build-system-reviewers,jgilbert,andi 2021-07-30 11:39:39 +00:00
config Bug 1722055 - Rename gfx.webrender.force-disabled. r=aosmond 2021-07-23 17:00:29 +00:00
docs Bug 1722635 - Add some brief Moz2D documentation. r=mstange 2021-07-28 13:11:41 +00:00
gl Backed out 2 changesets (bug 1717151) for Crashtest failures in dom/media/gmp/GMPServiceParent.cpp. CLOSED TREE 2021-08-03 01:56:11 +03:00
graphite2 Bug 1722127 - Modify rlbox graphite struct defs for windows compat r=tjr 2021-07-27 13:09:44 +00:00
harfbuzz Bug 1707096 - fix the build for clang-trunk. r=jfkthame 2021-06-02 14:38:01 +00:00
ipc Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi 2021-07-29 23:38:31 +00:00
layers Backed out changeset e41bfdf79fb8 (bug 1665476) for causing windows mochitest failures in test_windowminmaxsize.xhtml 2021-08-02 02:14:52 +03:00
ots Bug 1696935 - Update OTS to 8.1.4. r=jfkthame 2021-03-10 15:45:45 +00:00
qcms Bug 1721596 - qcms: Rerun rustfmt. r=aosmond 2021-07-21 13:03:23 +00:00
skia Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi 2021-07-29 23:38:31 +00:00
src Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi 2021-07-29 23:38:31 +00:00
tests Bug 1722689 - Don't clamp minimum font size on macOS to 1 pixel; allow really tiny sizes (which may subsequently be scaled). r=lsalzman 2021-08-01 20:06:38 +00:00
thebes Bug 1720169 - Pack instance data for multiple draw calls in to large fixed-size VBOs. r=gfx-reviewers,nical 2021-08-03 15:47:35 +00:00
vr Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi 2021-07-29 23:38:31 +00:00
webrender_bindings Backed out 2 changesets (bug 1717151) for Crashtest failures in dom/media/gmp/GMPServiceParent.cpp. CLOSED TREE 2021-08-03 01:56:11 +03:00
wgpu Backed out changeset 3cb3442efede (bug 1622846) for causing Bug 1722702 CLOSED TREE 2021-07-29 20:14:46 +03:00
wgpu_bindings Backed out changeset 3cb3442efede (bug 1622846) for causing Bug 1722702 CLOSED TREE 2021-07-29 20:14:46 +03:00
wr Bug 1720169 - Pack instance data for multiple draw calls in to large fixed-size VBOs. r=gfx-reviewers,nical 2021-08-03 15:47:35 +00:00
ycbcr Bug 1654461 - Make ConvertYCbCrToRGB32 color range aware r=jbauman,aosmond 2021-05-19 18:03:43 +00:00
moz.build Bug 1722653 - Remove --enable-system-cairo. r=firefox-build-system-reviewers,jrmuizel,andi 2021-07-29 23:38:30 +00:00