Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSync changes from mozilla-central #3816
Merged
+342
−170
Conversation
… faces with FreeType. r=lsalzman Differential Revision: https://phabricator.services.mozilla.com/D57246 [wrupdater] From https://hg.mozilla.org/mozilla-central/rev/f2d54eefdb444abf8a5dc66a8eafec16ba8c59fc
Uploading texture data is showing up frequently in profiles on Adreno devices, especially when zooming on a text-heavy page. Specifically, the time is spent in glMapBufferRange and glBufferSubData, most likely when internally allocating the buffer before transferring data in to it. Currently, we are creating a new PBO, by calling glBufferData(), for each individual upload region. This change makes it so that we calculate the required size for all upload regions to a texture, then create single a PBO of the required size. The entire buffer is then mapped only once, and each individual upload chunk is written to it. This can require the driver to allocate a large buffer, sometimes multiple megabytes in size. However, it handles this case much better than allocating tens or even hundreds of smaller buffers. An upload chunk may require more space in a PBO than the original CPU-side buffer, so that the data is aligned correctly for performance or correctness reasons. Therefore it is the caller of Device.upload_texture()'s responsibility to call a new function, Device.required_upload_size(), to calculate the required size beforehand. On AMD Macs, there is a bug where PBO uploads from a non-zero offset can fail. See bug 1603783. Therefore this patch preserves the current behaviour on AMD Mac, reallocating a new PBO for each upload, therefore ensuring the offset is always zero. Differential Revision: https://phabricator.services.mozilla.com/D56382 [wrupdater] From https://hg.mozilla.org/mozilla-central/rev/44161695885886b689baae2ad8b357f81f3eef23
…=kvark Differential Revision: https://phabricator.services.mozilla.com/D57549 [wrupdater] From https://hg.mozilla.org/mozilla-central/rev/35af0b925215124a619bc054aeeb8d01e99b4e63
|
@bors-servo r+ |
|
|
bors-servo
added a commit
that referenced
this pull request
Dec 18, 2019
Sync changes from mozilla-central
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
moz-gfx commentedDec 18, 2019
No description provided.