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 upAdd support for primitive shaders referencing the render target caches. #1585
Conversation
This switches ps_cache_image over to use SourceTexture::CacheRGBA8. The idea here is to enable primitives added during batch creation to select a render cache target as a source texture. This is possible now since the texture cache uses array textures, and therefore shares the same sampler target as the render target cache. The goal is to begin unifying some of the shaders - for example, the ps_cache_image shader can be replaced by the normal ps_image shader, which will reduce the number of shaders and shader switches.
|
r? @kvark Most of the changes here are moving a few pre-existing fields from the It's still a bit untidy how we reference the cache texture in places, but I consider this an incremental improvement. |
|
|
| cache_texture_id_map: Vec<TextureId>, | ||
| texture_cache_upload_pbo: PBOId, | ||
| // Manages and resolves source textures IDs to real texture IDs. | ||
| texture_resolver: SourceTextureResolver, |
This comment has been minimized.
This comment has been minimized.
|
@bors-servo r+ |
|
|
bors-servo
added a commit
that referenced
this pull request
Aug 17, 2017
Add support for primitive shaders referencing the render target caches. This switches ps_cache_image over to use SourceTexture::CacheRGBA8. The idea here is to enable primitives added during batch creation to select a render cache target as a source texture. This is possible now since the texture cache uses array textures, and therefore shares the same sampler target as the render target cache. The goal is to begin unifying some of the shaders - for example, the ps_cache_image shader can be replaced by the normal ps_image shader, which will reduce the number of shaders and shader switches. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1585) <!-- Reviewable:end -->
|
|
This was referenced Aug 17, 2017
Merged
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.
glennw commentedAug 17, 2017
•
edited by larsbergstrom
This switches ps_cache_image over to use SourceTexture::CacheRGBA8.
The idea here is to enable primitives added during batch creation
to select a render cache target as a source texture. This is possible
now since the texture cache uses array textures, and therefore shares
the same sampler target as the render target cache.
The goal is to begin unifying some of the shaders - for example,
the ps_cache_image shader can be replaced by the normal ps_image
shader, which will reduce the number of shaders and shader switches.
This change is