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 destructors to some WebGL objects, remove duplicated glutin dependency and try to enable the webgl reftests #8291

Merged
merged 7 commits into from Nov 2, 2015

Conversation

@emilio
Copy link
Member

emilio commented Nov 1, 2015

The first commit allows to cleanup the gl resources of the webgl task earlier if they aren't being used.
Right now all resources were cleaned up when the context was destroyed, so I think this is
a slightly better approach.

The second commit bumps rust-offscreen-rendering-context to remove the duplicated glutin dependency.

The third one tries to reenable the webgl reftests.
Since the errored builds are deleted, It's the only way I can try to troubleshoot it.

Review on Reviewable

emilio added 3 commits Nov 1, 2015
…buffer

This allows to cleanup resources earlier if they stop being used. Right
now all resources were cleaned up when the context was destroyed, this is
a slightly better approach.

We ignore the possible failure of the send() call, since we don't keep
track of these resources from the `WebGLRenderingContext` structure, so
a texture could be destroyed after the context and give us problems.
I can't reproduce locally the failure that produced them, and since the
builds that triggered them are deleted for some reason (like
http://build.servo.org/builders/linux-dev/builds/419), it could be a
good moment to troubleshoot it.

If merged closes #7931
@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

r? @jdm

@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

I don't know how the part of migrating tests to wpt/mozilla is going, probably should move them there instead of re-enabling them in test/ref?

@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

@jdm I added two commits moving the reftests to mozilla/wpt. The 6 tests are passing for me, tell me if you want me to remove them though :)

@emilio emilio force-pushed the emilio:webgl-drop branch from 50b5c53 to 2ae5835 Nov 1, 2015
@jdm
Copy link
Member

jdm commented Nov 1, 2015

These changes basically look fine to me. We just need to fix the test-tidy errors and assuage my curiosity :)

@emilio emilio force-pushed the emilio:webgl-drop branch from 2ae5835 to 3a83f1b Nov 1, 2015
@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

@jdm That just loads the gl symbols calling the corresponding API (glx/cgl/egl...). It does the same that the line you mentioned, but without creating a gl context itself. I did that just in order to not depend on a glutin context to load the symbols.

It's messy why we have a headless mode via feature and a headless mode via flag, and why they're handled differently, but...

@jdm jdm removed the S-awaiting-answer label Nov 1, 2015
@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

I updated the PR so it should pass tidy now :)

@jdm jdm removed the S-fails-tidy label Nov 1, 2015
@jdm
Copy link
Member

jdm commented Nov 1, 2015

@bors-servo
Copy link
Contributor

bors-servo commented Nov 1, 2015

📌 Commit 3a83f1b has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 1, 2015

Testing commit 3a83f1b with merge ad29de7...

bors-servo added a commit that referenced this pull request Nov 1, 2015
Add destructors to some WebGL objects, remove duplicated glutin dependency and try to enable the webgl reftests

The first commit allows to cleanup the gl resources of the webgl task earlier if they aren't being used.
Right now all resources were cleaned up when the context was destroyed, so I think this is
a slightly better approach.

The second commit bumps rust-offscreen-rendering-context to remove the duplicated glutin dependency.

The third one tries to reenable the webgl reftests.
Since the errored builds are deleted, It's the only way I can try to troubleshoot it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8291)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 1, 2015

💔 Test failed - android

@jdm
Copy link
Member

jdm commented Nov 1, 2015

main.rs:57:9: 57:22 error: unresolved name `gl::load_with` [E0425]
main.rs:57         gl::load_with(|addr| GLContext::get_proc_address(addr) as *const _);
                   ^~~~~~~~~~~~~
@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

Seems legit, for android servo omits it too (http://mxr.mozilla.org/servo/source/ports/glutin/window.rs#155)...

Maybe we're statically linking OpenGL there? In that case I'll omit it on android too

@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

What's the linux buildbot environment like?

emilio added 2 commits Nov 1, 2015
This allows running WebGL reftests in wpt.
@emilio emilio force-pushed the emilio:webgl-drop branch from 8b5011b to 12d1464 Nov 1, 2015
@jdm
Copy link
Member

jdm commented Nov 1, 2015

Did you see the stack trace from the other issue? We do have the ability to disable tests on particular platforms, too.

This new version shold prevent crashing on the linux buildbots.
@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

Check this out, I think this might be the cause: servo/surfman@aae6e57

I find it really weird that it fails on XOpenDisplay with null as an argument (which opens the default display), but it's the only cause I could think of after seeing that stack trace.

May you do a try build? (the tests should still fail, but not segfaulting at least). I'm not sure why the X server reports that there's no display though.

@eefriedman
Copy link
Contributor

eefriedman commented Nov 1, 2015

@bors-servo
Copy link
Contributor

bors-servo commented Nov 1, 2015

Trying commit 641e54b with merge 68c767c...

bors-servo added a commit that referenced this pull request Nov 1, 2015
Add destructors to some WebGL objects, remove duplicated glutin dependency and try to enable the webgl reftests

The first commit allows to cleanup the gl resources of the webgl task earlier if they aren't being used.
Right now all resources were cleaned up when the context was destroyed, so I think this is
a slightly better approach.

The second commit bumps rust-offscreen-rendering-context to remove the duplicated glutin dependency.

The third one tries to reenable the webgl reftests.
Since the errored builds are deleted, It's the only way I can try to troubleshoot it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8291)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 1, 2015

💔 Test failed - mac-rel-wpt

@eefriedman
Copy link
Contributor

eefriedman commented Nov 1, 2015

The changes don't seem to help; still just crashes (see http://build.servo.org/builders/linux-rel/builds/164/steps/shell_1/logs/stdio).

@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

Still crashing on linux, now I have no damn idea about what's going on... The mac failure seems like an unrelated timeout, so I think we're fine disabling these tests on linux for now, if we can't do better debugging.

How would I disable a reftest for a given platform? I guess it should be something like if os != "linux" PASS, but I'm not totally sure.

@emilio
Copy link
Member Author

emilio commented Nov 1, 2015

BTW @eefriedman thanks for your help! :)

@highfive highfive removed the S-tests-failed label Nov 2, 2015
@emilio
Copy link
Member Author

emilio commented Nov 2, 2015

@jdm Done :P

@jdm
Copy link
Member

jdm commented Nov 2, 2015

@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2015

📌 Commit 8fff34e has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2015

Testing commit 8fff34e with merge 3282174...

bors-servo added a commit that referenced this pull request Nov 2, 2015
Add destructors to some WebGL objects, remove duplicated glutin dependency and try to enable the webgl reftests

The first commit allows to cleanup the gl resources of the webgl task earlier if they aren't being used.
Right now all resources were cleaned up when the context was destroyed, so I think this is
a slightly better approach.

The second commit bumps rust-offscreen-rendering-context to remove the duplicated glutin dependency.

The third one tries to reenable the webgl reftests.
Since the errored builds are deleted, It's the only way I can try to troubleshoot it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8291)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2015

@bors-servo bors-servo merged commit 8fff34e into servo:master Nov 2, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@emilio emilio deleted the emilio:webgl-drop branch Nov 2, 2015
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.