Skip to content

Issue #9097: Don't panic when calling *VertexAttrib* with invalid indices - #9102

Closed
simartin wants to merge 1 commit into
servo:masterfrom
simartin:issue_9097
Closed

simartin wants to merge 1 commit into
servo:masterfrom
simartin:issue_9097

Conversation

@simartin

Copy link
Copy Markdown
Contributor

Fixes #9097

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 30, 2015
@emilio

emilio commented Dec 30, 2015

Copy link
Copy Markdown
Member

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


components/canvas/webgl_paint_task.rs, line 60 [r1] (raw file):
Good work finding the root cause of the panic :)

I think this is not the best solution though, since this check is needed in the DOM side too, and should generate an error there, instead of silently returning.

Normally whenever the WebGL task panics due to a gl error, it means that that error should have been handled in the DOM side.

As a quick fix, we could make these calls synchronous, and return a WebGLResult, but long term it's probably more efficient to make a GLLimits or GLContextInfo structure, pass it on context creation, and refresh it when needed so we can do the checks before sending messages all over the place.

It'd be a good idea to add it to https://github.com/ecoal95/rust-offscreen-rendering-context/, so it can be re-used, over all in WebRender (don't forget to derive Serialize so it can be sent).

For now it could just have a single member (max_vertex_attribs), but we should be able to add more context info there for use in the DOM side.


Comments from the review on Reviewable.io

@simartin

Copy link
Copy Markdown
Contributor Author

components/canvas/webgl_paint_task.rs, line 60 [r1] (raw file):
Thanks for the hint. I'll work in that direction...


Comments from the review on Reviewable.io

@simartin

simartin commented Jan 9, 2016

Copy link
Copy Markdown
Contributor Author

components/canvas/webgl_paint_task.rs, line 60 [r1] (raw file):
rust-offscreen-rendering-context PR submitted: servo/surfman#48


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #9201) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jan 10, 2016
@jdm

jdm commented Feb 24, 2016

Copy link
Copy Markdown
Member

@ecoal95 What's the status here? Is this waiting on changes from @simartin or review from you?

@emilio

emilio commented Feb 24, 2016

Copy link
Copy Markdown
Member

It's waiting changes from @simartin, I initially forgot to update the labels when reviewing, I'll do it now :)

@emilio emilio added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Feb 24, 2016
@jdm

jdm commented Mar 10, 2016

Copy link
Copy Markdown
Member

I filed #9958 to keep track of this work. Feel free to reopen this PR if you want to keep working on it!

@jdm jdm closed this Mar 10, 2016
@simartin
simartin deleted the issue_9097 branch March 11, 2017 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-needs-code-changes Changes have not yet been made that were requested by a reviewer. S-needs-rebase There are merge conflict errors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants