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 #3727
Merged
Conversation
Allow the swizzle to be configurable with a texture binding. This is still experimental and needs to be tested well on all platforms. Basic approach is the following: - WR device figures out how it can use BGRA and makes the texture cache format configurable at run-time. It tries to make the uploads to the shared texture cache pages to be done without any driver conversions, and without extra memory allocated. - it also reports the preferred input format for the images, which may be different from the texture cache format - if WR texture cache is asked to allocate a shared texture with a different (swizzled) format from the preferred, it associates the cache entry with a swizzle - the swizzle becomes a part of the `SourceTexture`, which affects batch splitting - when a texture reaches binding by GL device, it checks whether the current swizzle on this texture doesn't match the given one, and configures the texture sampling accordingly - we can't use blits with swizzling, so when that needs to happen we use `cs_copy` path, which is now mostly rewritten The idea is that Gecko would ask WR for the preferred format and configure its image decoding to produce image data that doesn't require any swizzling. The PR changes existing texture upload (and batching) paths. On Linux, if texture storage is available, we now use it and provide the data as RGBA, assuming no conversion by the driver. The swizzling kicks in when we sample this data in the shader. On Windows/Angle we use BGRA as an internal format for texture cache and expect Gecko to provide BGRA data, this should be unchanged. Differential Revision: https://phabricator.services.mozilla.com/D21965 [wrupdater] From https://hg.mozilla.org/mozilla-central/rev/bc58681d24079ae0bdb65c9679455042dccf0e76
|
@bors-servo r+ |
|
|
bors-servo
added a commit
that referenced
this pull request
Jul 30, 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 commentedJul 30, 2019
•
edited by larsbergstrom
This change is