Skip to content
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

Optimize the PrimitiveBatchData enum #456

Closed
glennw opened this issue Oct 21, 2016 · 0 comments
Closed

Optimize the PrimitiveBatchData enum #456

glennw opened this issue Oct 21, 2016 · 0 comments

Comments

@glennw
Copy link
Member

@glennw glennw commented Oct 21, 2016

This enum has a Vec that is the same for many batch types. Previously, they were separate types. We could unify this enum to use a single Vec and then store offsets / lengths for each batch. This would allow us to change the renderer to create far fewer UBOs which would improve the speed of the compositor time.

@kvark kvark self-assigned this Nov 28, 2016
bors-servo added a commit that referenced this issue Nov 30, 2016
PrimitiveBatchData for all

Fixes #456

More stuff to come.

<!-- 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/609)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Dec 13, 2016
Instanced attributes

Closes #457

Performance-wise, I wasn't able to register a noticeable difference. Tested on https://github.com/servo/servo, full screen after the second page down, on `Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2)` with resolution 2560x1440.

With the change, I got 4.5 ms mean GPU time in the first test, and 4.3 ms time in the second.
Without the change, I got 4.4 ms mean GPU time in the only test.

I suppose the difference is not visible since we are far from being VS-bound.

Note: this does not replace the optimization of having one large buffer in #456. Instanced attributes will benefit from it in the same way as UBOs.

<!-- 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/615)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.