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

Add some simple batching fixes. Draw calls on GH from 146 -> 14. #40

Merged
merged 1 commit into from Oct 19, 2015

Conversation

@glennw
Copy link
Member

glennw commented Oct 19, 2015

(Relies on the unmerged PR to switch glyph rendering to RGBA8 textures for those numbers).

One of the major issues is that sometimes the batcher ping pongs between
textures when using the dummy white texture. This was previously RGB8
format, so any glyphs would break batching. It's now RGBA8 which means that
batching works well with glyphs. The proper fix will be to add a dummy white
image in both RGB8 and RGBA8 format - and make the batcher aware of this. It
can then select the dummy white image that will avoid breaking the batch.

Additionally, the AABB tree split threshold of 512 was resulting in nodes that were
around 256 pixels high on GH. This produces too many false overlap detections that
currently cause batch breaks. Switching to 1024 didn't seem to affect parallelism
of batch building on any sites I tested. The proper fix for this involves making
the overlap detection a bit smarter, but more importantly, detecting when overlaps
involve opaque items and avoiding batch breaks in these situations.

Fixes #35.

(Relies on the unmerged PR to switch glyph rendering to RGBA8 textures for those numbers).

One of the major issues is that sometimes the batcher ping pongs between
textures when using the dummy white texture. This was previously RGB8
format, so any glyphs would break batching. It's now RGBA8 which means that
batching works well with glyphs. The proper fix will be to add a dummy white
image in both RGB8 and RGBA8 format - and make the batcher aware of this. It
can then select the dummy white image that will avoid breaking the batch.

Additionally, the AABB tree split threshold of 512 was resulting in nodes that were
around 256 pixels high on GH. This produces too many false overlap detections that
currently cause batch breaks. Switching to 1024 didn't seem to affect parallelism
of batch building on any sites I tested. The proper fix for this involves making
the overlap detection a bit smarter, but more importantly, detecting when overlaps
involve opaque items and avoiding batch breaks in these situations.

Fixes #35.
glennw added a commit that referenced this pull request Oct 19, 2015
Add some simple batching fixes. Draw calls on GH from 146 -> 14.
@glennw glennw merged commit c8501a9 into master Oct 19, 2015
@glennw glennw deleted the batching-tweaks branch Oct 19, 2015
nox pushed a commit to nox/webrender that referenced this pull request Aug 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

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