Closed
Bug 1326159
Opened 7 years ago
Closed 7 years ago
Failures in 2.0.0/conformance2/transform_feedback/transform_feedback.html
Categories
(Core :: Graphics: CanvasWebGL, defect, P1)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: jgilbert, Assigned: jgilbert)
References
Details
(Whiteboard: gfx-noted)
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
daoshengmu
:
review+
lizzard
:
approval-mozilla-aurora+
lizzard
:
approval-mozilla-beta+
|
Details |
Reconsidering, our previous restriction choices are insufficient, though forbidding simultaneous TRANSFORM_FEEDBACK_BUFFER+ARRAY_BUFFER binding seems unnecessary. Let's try without it and see what the damage is.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Blocks: webgl2-blockers
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8822349 [details] Bug 1326159 - Update TF buffer restrictions. - https://reviewboard.mozilla.org/r/101294/#review101958 ::: dom/canvas/WebGL2ContextBuffers.cpp:138 (Diff revision 1) > > if (byteLen) { > - const auto mappedBytes = gl->fMapBufferRange(target, srcByteOffset, glByteLen, > + const bool isTF = (target == LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER); > + GLenum mapTarget = target; > + if (isTF) { > + gl->fBindTransformFeedback(LOCAL_GL_TRANSFORM_FEEDBACK, mEmptyTFO); why do we need `mEmptuTFO` here if we can bind `0` instead? ::: dom/canvas/WebGLContext.h (Diff revision 1) > > //////////////////////////////////// > > -private: > - mutable bool mBuffersForUB_Dirty; > - mutable std::set<const WebGLBuffer*> mBuffersForUB; nice to see these removed ::: dom/canvas/WebGLContextBuffers.cpp:487 (Diff revision 1) > if (bindPoint == buffer) { > - bindPoint = nullptr; > + WebGLBuffer::SetSlot(target, nullptr, &bindPoint); > } > }; > > - fnClearIfBuffer(mBoundArrayBuffer); > + fnClearIfBuffer(0, mBoundArrayBuffer); I don't think `0` is a valid parameter here, given the expected `GLenum` type. Perhaps, you want `LOCAL_GL_ARRAY_BUFFER` instead? ::: dom/canvas/WebGLContextBuffers.cpp:512 (Diff revision 1) > + binding.mBufferBinding); > } > } > > for (auto& binding : mIndexedUniformBufferBindings) { > - fnClearIfBuffer(binding.mBufferBinding); > + fnClearIfBuffer(0, binding.mBufferBinding); shouldn't this be `LOCAL_GL_UNIFORM_BUFFER`? ::: dom/canvas/WebGLProgram.cpp:719 (Diff revision 1) > } > } > > switch (pname) { > case LOCAL_GL_ATTACHED_SHADERS: > + return JS::NumberValue( int(bool(mVertShader.get())) + int(bool(mFragShader)) ); shouldn't we use `mFragShader.get()` here as well? ::: dom/canvas/WebGLVertexArray.cpp:39 (Diff revision 1) > +} > + > +void > +WebGLVertexArray::AddBufferBindCounts(int8_t addVal) const > +{ > + const GLenum target = 0; // Anything non-TF is fine. This is similar to the previous cases, but with justification in the comment. I don't think it's sensible to have `GLenum` in the API that is treated as a `bool`.
Assignee | ||
Comment 3•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8822349 [details] Bug 1326159 - Update TF buffer restrictions. - https://reviewboard.mozilla.org/r/101294/#review101958 > why do we need `mEmptuTFO` here if we can bind `0` instead? 0 is the default TFO, which is a fully-functional TFO, which can have non-zero bindings.
Assignee | ||
Comment 4•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8822349 [details] Bug 1326159 - Update TF buffer restrictions. - https://reviewboard.mozilla.org/r/101294/#review101958 > I don't think `0` is a valid parameter here, given the expected `GLenum` type. Perhaps, you want `LOCAL_GL_ARRAY_BUFFER` instead? I'm short-handing it. Really anything that's not TRANSFORM_FEEDBACK_BUFFER has the desired effect. > shouldn't this be `LOCAL_GL_UNIFORM_BUFFER`? I'm short-handing it. > shouldn't we use `mFragShader.get()` here as well? Since bool(mFragShader) works, I shouldn't use .get() on either. > This is similar to the previous cases, but with justification in the comment. I don't think it's sensible to have `GLenum` in the API that is treated as a `bool`. I think it's a little cleaner this way, as well as allowing passing `target` directly. Otherwise we're passing blind true/false around in most of these cases, which is generally worse. ("what does `true` mean at this callsite?")
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8822349 [details] Bug 1326159 - Update TF buffer restrictions. - https://reviewboard.mozilla.org/r/101294/#review101980 ::: dom/canvas/WebGLVertexArray.cpp:39 (Diff revision 1) > +} > + > +void > +WebGLVertexArray::AddBufferBindCounts(int8_t addVal) const > +{ > + const GLenum target = 0; // Anything non-TF is fine. Yes, I agree bool arguments in general are bad. But I didn't propose to change it to `bool`, I just said it's treated as one. So you might as well have an `enum` with `IsTF` and `NonTF` values or somethine.
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8822349 [details] Bug 1326159 - Update TF buffer restrictions. - https://reviewboard.mozilla.org/r/101294/#review102004 LGTM
Attachment #8822349 -
Flags: review?(dmu) → review+
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/aa8818f77045 Update TF buffer restrictions. - r=daoshengmu
Assignee | ||
Comment 8•7 years ago
|
||
Comment on attachment 8822349 [details] Bug 1326159 - Update TF buffer restrictions. - Approval Request Comment [Feature/Bug causing the regression]: webgl2-blocker [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 #8822349 -
Flags: approval-mozilla-beta?
Attachment #8822349 -
Flags: approval-mozilla-aurora?
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aa8818f77045
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•7 years ago
|
status-firefox51:
--- → affected
status-firefox52:
--- → affected
Comment 10•7 years ago
|
||
Comment on attachment 8822349 [details] Bug 1326159 - Update TF buffer restrictions. - Another fairly big change. Looks like we need this for WebGL2 enabling on 51.
Attachment #8822349 -
Flags: approval-mozilla-beta?
Attachment #8822349 -
Flags: approval-mozilla-beta+
Attachment #8822349 -
Flags: approval-mozilla-aurora?
Attachment #8822349 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 11•7 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/7368fa4424f5 https://hg.mozilla.org/releases/mozilla-beta/rev/405b825d5efd
You need to log in
before you can comment on or make changes to this bug.
Description
•