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

Switch to immutable texture storage and invalidate unused framebuffers #3195

Merged
merged 6 commits into from Oct 13, 2018

Conversation

@bholley
Copy link
Contributor

bholley commented Oct 12, 2018

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1496168


This change is Reviewable

bholley added 2 commits Oct 12, 2018
That's the proper type. The fact that the glTexImage* calls take a glint
is a specific wart of that API that's not relevant to us here.

Differential Revision: https://phabricator.services.mozilla.com/D8564
@bholley
Copy link
Contributor Author

bholley commented Oct 12, 2018

@bors-servo r=kvark

@bors-servo
Copy link
Contributor

bors-servo commented Oct 12, 2018

📌 Commit 7f625ca has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Oct 12, 2018

Testing commit 7f625ca with merge 0c91d47...

bors-servo added a commit that referenced this pull request Oct 12, 2018
Switch to immutable texture storage and invalidate unused framebuffers

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1496168

<!-- 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/3195)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 12, 2018

💔 Test failed - status-taskcluster

@jrmuizel
Copy link
Contributor

jrmuizel commented Oct 12, 2018

thread 'main' panicked at 'assertion failed: texture.target == gl::TEXTURE_2D || texture.target == gl::TEXTURE_RECTANGLE ||
    texture.target == gl::TEXTURE_EXTERNAL_OES', webrender/src/device/gl.rs:1671:9
bholley added 4 commits Oct 11, 2018
The current setup doesn't work with glTexStorage. Given that it's only
used for a few callers, it's cleanest to move it to an explicit call at
those sites.

Differential Revision: https://phabricator.services.mozilla.com/D8565
This is required by glTexStorage*. We also take the opportunity to
simplify and clarify the situation with BGRA.

Differential Revision: https://phabricator.services.mozilla.com/D8566
This allows the driver to avoid preserving the old contents we don't
care about.

Differential Revision: https://phabricator.services.mozilla.com/D8568
@bholley bholley force-pushed the bholley:immutable_storage branch from 7f625ca to 36cb19d Oct 13, 2018
@bholley
Copy link
Contributor Author

bholley commented Oct 13, 2018

I had to add support for the texture array case to upload_texture_immediate to support loading captures of the texture cache.

@bholley
Copy link
Contributor Author

bholley commented Oct 13, 2018

@bors-servo r=kvark

@bors-servo
Copy link
Contributor

bors-servo commented Oct 13, 2018

📌 Commit 36cb19d has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Oct 13, 2018

Testing commit 36cb19d with merge 5adc86c...

bors-servo added a commit that referenced this pull request Oct 13, 2018
Switch to immutable texture storage and invalidate unused framebuffers

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1496168

<!-- 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/3195)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 13, 2018

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: kvark
Pushing 5adc86c to master...

@bors-servo bors-servo merged commit 36cb19d into servo:master Oct 13, 2018
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@staktrace
Copy link
Contributor

staktrace commented Oct 17, 2018

@bholley @kvark any ideas off the top of your head why this PR would result in all the glyphs and images turning into black rectangles on Android? https://bugzilla.mozilla.org/show_bug.cgi?id=1499785

@bholley
Copy link
Contributor Author

bholley commented Oct 17, 2018

I'll comment in the bug.

@kvark
Copy link
Member

kvark commented Oct 17, 2018

@staktrace re-reading the code, maybe we are using the wrong external format now?
Old code had gl::BGRA_EXT or gl::RGBA. The new code has gl::BGRA always as the external format. Although, this wouldn't turn them black, I suppose.

@bholley
Copy link
Contributor Author

bholley commented Oct 17, 2018

Old code had gl::BGRA_EXT or gl::RGBA. The new code has gl::BGRA always as the external format.

I think the old code was nonsensical. IIUC, the external format describes the arrangement of pixels delivered by the application, which wouldn't change based on whether GL_EXT_texture_format_BGRA8888 is supported by the driver. ImageFormat::BGRA is going to have pixels in that order.

Although, this wouldn't turn them black, I suppose.

Yeah, it would just swap around the colors. And that's exactly what jdm reported in #2731. :-)

I'm pretty sure the black means that the textures aren't getting created at all. Driver logs are probably the next step.

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.

None yet

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