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 upRemove UBO usage. #457
Remove UBO usage. #457
Comments
|
@glennw I disagree. I don't think
On Windows we are using Direct3D anyway, which has InstanceDataStepRate field as of version 10. And on Linux/OSX we got GL 3.3 core support. In general, if we are talking about GL extensions and not core GL versions, I haven't seen a system that would support instanced draw calls but not instanced arrays. As for GLES, version 3.0 has our stuff included. |
Vertex attributes cleanup This is the preparation work for #457 <!-- 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/610) <!-- Reviewable:end -->
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 -->
Instead of using UBOs for submitting primitive instances and using gl_InstanceID, with the recent changes to prim_store, it would be better now to submit the PrimitiveInstance structures as instanced vertex attributes.