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

Clean up WebGL parameter functions #8743

Closed
wants to merge 3 commits into from
Closed

Conversation

@dzbarsky
Copy link
Member

dzbarsky commented Nov 30, 2015

Do we have tests for WebGL?
Trying to get http://learningwebgl.com/lessons/lesson01/index.html running but we're still missing some things.

Review on Reviewable

@dzbarsky dzbarsky changed the title Implement getProgramParameter and do a little cleanup Clean up WebGL paramater functions Nov 30, 2015
@dzbarsky dzbarsky changed the title Clean up WebGL paramater functions Clean up WebGL parameter functions Nov 30, 2015
dzbarsky added 2 commits Nov 30, 2015
@jdm
Copy link
Member

jdm commented Nov 30, 2015

We have some tests (there's webgl/ under WPT and webg/ under the mozilla/ directory), but most are disabled due to #7931.

@jdm
Copy link
Member

jdm commented Nov 30, 2015

@ecoal95 Want to review this one? :)

@emilio
Copy link
Member

emilio commented Nov 30, 2015

@jdm Yep! :)

@emilio emilio self-assigned this Nov 30, 2015
@emilio
Copy link
Member

emilio commented Nov 30, 2015

Looks good to me, @bzbarsky ping me when gleam is updated and I'll r+ this :)

-S-awaiting-review +S-blocked-on-external


Review status: 0 of 6 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


components/canvas/webgl_paint_task.rs, line 343 [r1] (raw file):
Nice! These validations were done in script to avoid an ipc-channel roundtrip, but I think this way is better, since we only have the logic in one place, and we'd only get the speed-up in invalid cases anyways, so...


components/script/dom/webglrenderingcontext.rs, line 640 [r1] (raw file):
I've re-read the spec here, and even though there's no behaviour specified, both gecko and chromium generate an InvalidValue error when the program is null.

I think it would be nice to mimic this behaviour where null values are not expected. They're a few functions though, so this can be left as a followup if you want. I've filled #8753


Comments from the review on Reviewable.io

@bzbarsky
Copy link
Contributor

bzbarsky commented Nov 30, 2015

@ecoal95 You have the wrong Zbarsky, I think.

@emilio
Copy link
Member

emilio commented Nov 30, 2015

@bzbarsky thanks! Sorry, I meant @dzbarsky.

@dzbarsky
Copy link
Member Author

dzbarsky commented Dec 1, 2015

Review status: 0 of 6 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


components/canvas/webgl_paint_task.rs, line 343 [r1] (raw file):
Yep, that's what I figured.


components/script/dom/webglrenderingcontext.rs, line 640 [r1] (raw file):
If we do that we should also get the spec changed.


Comments from the review on Reviewable.io

@emilio
Copy link
Member

emilio commented Dec 1, 2015

Review status: 0 of 6 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


components/script/dom/webglrenderingcontext.rs, line 640 [r1] (raw file):
I don't think so, I think it conforms to the spec in the sense that WebGL's behaviour, unless specified otherwise, must much the behaviour of GLES 2.

In that sense, the reference for most of this functions (eg glGetProgramiv) have a line similar to the following:

GL_INVALID_OPERATION is generated if program does not refer to a program object.

I therefore think it's legit and spec-compliant (probably even required?) to acquire this behaviour.


Comments from the review on Reviewable.io

@emilio
Copy link
Member

emilio commented Dec 1, 2015

Review status: 0 of 6 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


components/script/dom/webglrenderingcontext.rs, line 640 [r1] (raw file):
s/must much/must match/ (sorry)


Comments from the review on Reviewable.io

@dzbarsky
Copy link
Member Author

dzbarsky commented Dec 2, 2015

#8761 instead

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.