-
Notifications
You must be signed in to change notification settings - Fork 282
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
Implement the fallback path for the big size image #1405
Comments
cc @nical I thought we handled this with tiling support now? |
Ah, probably just not for external images, right? |
The plan is to use tiling for this, I thought we already supported tiled external images, but there might be a bit of missing glue to get the two to work together (I vaguely remember looking into this a while back but now I a not sure what came out of it). It should not be hard to do. |
So I had another look and we already have code to support tiling external buffer images the same way we tile regular images. This is done by specifying the proper stride and offset in the texture cache that is passed to @JerryShih Are you referring to other types of external images (like external texture handles) that are bigger than webrender's maximum texture size setting? |
I think the "external buffer" could be used with a large size[1]. But I think this type of buffer could be tiled. |
@JerryShih I did some testing and as far as I can tell, external image buffers are properly tiled inside WebRender, with two exceptions: masks and yuv images. Gecko currently doesn't support tiling masks and yuv images either (but maybe that doesn't trigger a fatal assertion). Could you provide some more details about how you run into this issue (when you have some time, no hurry)? |
We're seeing crashes like: https://bugzilla.mozilla.org/show_bug.cgi?id=1383731 Shouldn't tiling be preventing this from happening? |
Tiling should indeed prevent this from happening, unless the image is a mask (or a yuv image). I'll look into adding more useful information in the assertion to see where this is coming from. |
I have some tests in: |
We could try to implement the tiling for all mask types and yuv buffer, but I think the shader code for masking will become a little bit complicated. So, I will still try to use a dummy texture if we hit the limitation of texture size. |
@kvark @glennw webrender/webrender/src/renderer.rs Line 703 in 6dd3ddb
Maybe we could reuse this texture if we can't allocate the new texture or we hit the size boundary. |
This dummy cache texture appears to be passed by default for render passes that don't actually need to read from the texture cache. It sounds reasonable to use it as the fallback texture when we fail to allocate an image. |
Handle big size image @nical @glennw @kvark @sotaroikeda r? This patch try to handle the #1405. If we hit the maximum texture size, turn to use a 1x1 rgba(255,255,255,255) dummy texture. <!-- 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/1564) <!-- Reviewable:end -->
Closing this now since #1564 has landed. Please re-open if there is more work needed. |
@kvark @glennw @nical @sotaroikeda
In webrender, we have the limit size of gl texture. Currently, there is an assertion if the image is to large[1]. When we integrate gecko with WR, there are a lot of crash for this assertion.
I'm trying to create a global shared black texture. If we hit the limitation, show the global shared texture instead.
[1]
cb510c5
The text was updated successfully, but these errors were encountered: