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 upPort ps_blend to be a brush shader. #2401
Conversation
|
This is not quite ready yet:
But I don't expect those to change the PR massively, so it can probably be reviewed when someone has time. |
|
Reviewed 18 of 18 files at r1. webrender/src/picture.rs, line 589 at r1 (raw file):
we could have an extra GPU block range for the color matrix specifically Comments from Reviewable |
|
Gecko try looks good for this patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c0b581040687afa53d6214015adc1b7786c71c0b (apart from some unrelated intermittent failures). I changed the failing wrench reftest to have a much larger fuzziness value. The issue here is that the text run caching shader doesn't apply any form of snapping, which can result in issues like this. We can fix this separately. |
|
@bors-servo r=kvark (via irc) |
|
|
Port ps_blend to be a brush shader. Previously, ps_blend applied the blend operation in 2D screen-space. Now, blends are performed as a normal brush shader. This provides several benefits: * For a transformed primitive, we blend fewer pixels, since we only draw the composite step as a transformed primitive, rather than a 2D screen aligned rect. * We can optionally apply all the usual features that are part of the brush shader, specifically clip masks, edge AA and pixel snapping. * This lays the groundwork for supporting picture targets that are selectable to be either rasterized in local-space or screen-space, depending on what the caller requests as a performance / quality trade-off. Next, we'll port hw_composite and composite shaders to use the same brush format, and add support for applying the source texture based on whether it was rasterized in local or screen space. <!-- 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/2401) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Port ps_blend to be a brush shader. Previously, ps_blend applied the blend operation in 2D screen-space. Now, blends are performed as a normal brush shader. This provides several benefits: * For a transformed primitive, we blend fewer pixels, since we only draw the composite step as a transformed primitive, rather than a 2D screen aligned rect. * We can optionally apply all the usual features that are part of the brush shader, specifically clip masks, edge AA and pixel snapping. * This lays the groundwork for supporting picture targets that are selectable to be either rasterized in local-space or screen-space, depending on what the caller requests as a performance / quality trade-off. Next, we'll port hw_composite and composite shaders to use the same brush format, and add support for applying the source texture based on whether it was rasterized in local or screen space. <!-- 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/2401) <!-- Reviewable:end -->
|
Hmmm, a couple of mac-specific failures. I'll investigate those further - maybe there is an accuracy issue somewhere that's not being picked up by the gecko tests. |
|
|
|
|
Previously, ps_blend applied the blend operation in 2D screen-space. Now, blends are performed as a normal brush shader. This provides several benefits: * For a transformed primitive, we blend fewer pixels, since we only draw the composite step as a transformed primitive, rather than a 2D screen aligned rect. * We can optionally apply all the usual features that are part of the brush shader, specifically clip masks, edge AA and pixel snapping. * This lays the groundwork for supporting picture targets that are selectable to be either rasterized in local-space or screen-space, depending on what the caller requests as a performance / quality trade-off. Next, we'll port hw_composite and composite shaders to use the same brush format, and add support for applying the source texture based on whether it was rasterized in local or screen space.
|
Rebased and added a commit that (I think) fixes the accuracy issues. It drops the max difference in the wrench tests from 17 down to 1, which is what I'd expect. Still need to do a gecko try to see if it breaks anything there. |
Also pass complete VertexInfo struct to brushes.
|
@kvark OK, I think this is finally ready to go (after review of the most recent commit). The gecko try looks good now: There is one failure (expected due to #2408) and one unrelated intermittent failure. |
|
@bors-servo r+ |
|
|
Port ps_blend to be a brush shader. Previously, ps_blend applied the blend operation in 2D screen-space. Now, blends are performed as a normal brush shader. This provides several benefits: * For a transformed primitive, we blend fewer pixels, since we only draw the composite step as a transformed primitive, rather than a 2D screen aligned rect. * We can optionally apply all the usual features that are part of the brush shader, specifically clip masks, edge AA and pixel snapping. * This lays the groundwork for supporting picture targets that are selectable to be either rasterized in local-space or screen-space, depending on what the caller requests as a performance / quality trade-off. Next, we'll port hw_composite and composite shaders to use the same brush format, and add support for applying the source texture based on whether it was rasterized in local or screen space. <!-- 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/2401) <!-- Reviewable:end -->
|
|
glennw commentedFeb 9, 2018
•
edited by larsbergstrom
Previously, ps_blend applied the blend operation
in 2D screen-space. Now, blends are performed as
a normal brush shader. This provides several benefits:
For a transformed primitive, we blend fewer pixels,
since we only draw the composite step as a transformed
primitive, rather than a 2D screen aligned rect.
We can optionally apply all the usual features
that are part of the brush shader, specifically
clip masks, edge AA and pixel snapping.
This lays the groundwork for supporting picture
targets that are selectable to be either rasterized
in local-space or screen-space, depending on what
the caller requests as a performance / quality
trade-off.
Next, we'll port hw_composite and composite shaders
to use the same brush format, and add support for
applying the source texture based on whether it was
rasterized in local or screen space.
This change is