mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
e9869b1c8f
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 |
||
---|---|---|
.. | ||
2d | ||
angle | ||
cairo | ||
config | ||
docs | ||
gl | ||
graphite2 | ||
harfbuzz | ||
ipc | ||
layers | ||
ots | ||
qcms | ||
skia | ||
src | ||
tests | ||
thebes | ||
vr | ||
webrender_bindings | ||
wgpu | ||
wgpu_bindings | ||
wr | ||
ycbcr | ||
moz.build |