New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make batch caching based on z id rather than prim index. #3221
Conversation
Let's not merge this until #3131 lands - to avoid more rebase issues in that PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit unclear to me what your next steps are, and why primitive index needs to go in the first place. But overall the change looks fine :)
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gw3583)
webrender/src/frame_builder.rs, line 373 at r1 (raw file):
let mut prim_headers = PrimitiveHeaders::new(); // Used to generated a unique z-buffer value per primitive. let mut z_generator = ZBufferIdGenerator::new();
any reason we don't put it into RenderTargetContext
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that (eventually) there won't be a primitive index, there will just be primitive instances that reference interned primitive templates. This gets us one step closer to that :)
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gw3583)
webrender/src/frame_builder.rs, line 373 at r1 (raw file):
Previously, kvark (Dzmitry Malyshau) wrote…
any reason we don't put it into
RenderTargetContext
?
It's not mutable. We could make the z generator use a Cell in the future perhaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved
☔ The latest upstream changes (presumably #3131) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased on top of the backface visibility changes. @bors-servo r=kvark |
📌 Commit a9af605 has been approved by |
@bors-servo r=kvark |
📌 Commit 2d4cf88 has been approved by |
(trying to wake up bors, again) |
@bors-servo r=kvark |
💡 This pull request was already approved, no need to approve it again. |
📌 Commit 2d4cf88 has been approved by |
This is a necessary change for picture caching, because in the future pictures won't have a primitive index. It is also a better way of expressing the intent of the batch caching anyway (that the overlap detection should be invoked next time we have a primitive with a different z value).
@bors-servo r=kvark |
📌 Commit a748e38 has been approved by |
Manually merging since bors is asleep. I manually rebased this on the last manual merge and ran the reftests locally. |
This is a necessary change for picture caching, because in the
future pictures won't have a primitive index. It is also a
better way of expressing the intent of the batch caching anyway
(that the overlap detection should be invoked next time we have
a primitive with a different z value).
This change is