Closed
Bug 1321450
Opened 8 years ago
Closed 8 years ago
InvalidateFramebuffer is not implemented safely
Categories
(Core :: Graphics: CanvasWebGL, defect, P1)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: jgilbert, Assigned: jgilbert)
References
Details
Attachments
(3 files)
(deleted),
text/x-review-board-request
|
ethlin
:
review+
gchang
:
approval-mozilla-aurora+
gchang
:
approval-mozilla-beta+
|
Details |
(deleted),
text/x-review-board-request
|
ethlin
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
Details |
We can't just call InvalidateFramebuffer and not track which resources are invalidated.
We should probably be implementing this with glClear, which generally behaves very similarly to InvalidateFramebuffer.
Assignee | ||
Updated•8 years ago
|
Priority: -- → P1
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8815976 [details]
Bug 1321450 - Fix Invalidate[Sub]Framebuffer. -
https://reviewboard.mozilla.org/r/96738/#review97000
::: dom/canvas/WebGL2ContextFramebuffers.cpp:247
(Diff revision 1)
>
> - if (width < 0 || height < 0) {
> - ErrorInvalidValue("%s: width and height must be >= 0.", funcName);
> + // Some drivers (like OSX 10.9 GL) just don't support invalidate_framebuffer.
> + const bool useFBInvalidation = (mAllowFBInvalidation &&
> + gl->IsSupported(gl::GLFeature::invalidate_framebuffer));
> + if (useFBInvalidation) {
> + gl->fInvalidateFramebuffer(target, glNumAttachments, glAttachments);
We should call MakeContextCurrent() before fInvalidateFramebuffer.
::: dom/canvas/WebGL2ContextFramebuffers.cpp:277
(Diff revision 1)
>
> - if (!fb && !isDefaultFB) {
> - dom::Sequence<GLenum> tmpAttachments;
> - if (!TranslateDefaultAttachments(attachments, &tmpAttachments)) {
> - rv.Throw(NS_ERROR_OUT_OF_MEMORY);
> + // Some drivers (like OSX 10.9 GL) just don't support invalidate_framebuffer.
> + const bool useFBInvalidation = (mAllowFBInvalidation &&
> + gl->IsSupported(gl::GLFeature::invalidate_framebuffer));
> + if (useFBInvalidation) {
> + gl->fInvalidateSubFramebuffer(target, glNumAttachments, glAttachments, x, y,
MakeContextCurrent() too.
Attachment #8815976 -
Flags: review?(ethlin) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8817029 [details]
Bug 1321450 - Check our GLsizei args. -
https://reviewboard.mozilla.org/r/97470/#review97814
Attachment #8817029 -
Flags: review?(ethlin) → review+
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/80afe5f38d07
Fix Invalidate[Sub]Framebuffer. - r=ethlin
https://hg.mozilla.org/integration/mozilla-inbound/rev/0d7106de1332
Check our GLsizei args. - r=ethlin
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ee72d9b8e3e
Update tests.
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/80afe5f38d07
https://hg.mozilla.org/mozilla-central/rev/0d7106de1332
https://hg.mozilla.org/mozilla-central/rev/5ee72d9b8e3e
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Assignee | ||
Updated•8 years ago
|
See Also: → https://github.com/KhronosGroup/WebGL/pull/2188
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 9•8 years ago
|
||
Comment on attachment 8815976 [details]
Bug 1321450 - Fix Invalidate[Sub]Framebuffer. -
Approval Request Comment (for all patches)
[Feature/Bug causing the regression]: webgl2
[User impact if declined]:
[Is this code covered by automated tests?]:
[Has the fix been verified in Nightly?]:
[Needs manual test from QE? If yes, steps to reproduce]:
[List of other uplifts needed for the feature/fix]:
[Is the change risky?]:
[Why is the change risky/not risky?]:
[String changes made/needed]:
Attachment #8815976 -
Flags: approval-mozilla-beta?
Attachment #8815976 -
Flags: approval-mozilla-aurora?
Comment 10•8 years ago
|
||
Comment on attachment 8815976 [details]
Bug 1321450 - Fix Invalidate[Sub]Framebuffer. -
We need WebGL 2 in 51. Beta51+ & Aurora52+. Should be in 51 beta 8.
Attachment #8815976 -
Flags: approval-mozilla-beta?
Attachment #8815976 -
Flags: approval-mozilla-beta+
Attachment #8815976 -
Flags: approval-mozilla-aurora?
Attachment #8815976 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 12•8 years ago
|
||
Flags: needinfo?(jgilbert)
Assignee | ||
Comment 13•8 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•