Closed Bug 1264214 Opened 8 years ago Closed 8 years ago

webgl 1.0.3 conformance error: glsl/misc/shaders-with-name-conflicts.html

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: ethlin, Assigned: ethlin)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file, 8 obsolete files)

FAIL [unexpected link status] shaders with conflicting uniform/attribute names should fail
Attached patch Check conflicting name. (obsolete) — Splinter Review
Check the conflicting name in LinkProgram.
Attachment #8740817 - Flags: review?(jgilbert)
Comment on attachment 8740817 [details] [diff] [review]
Check conflicting name.

Review of attachment 8740817 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGLProgram.cpp
@@ +227,5 @@
>          }
>  
> +        // Check if the uniform conflicting to attrib
> +        if (info->attribMap.find(baseUserName) != info->attribMap.end()) {
> +            return nullptr;

Do this in LinkProgram afterwards. It'll be more clear that way.
Also, when we find a conflict, we need to leave a note in the program link log so the dev knows what's wrong.
Attachment #8740817 - Flags: review?(jgilbert) → review-
Attached patch Check conflicting name. (obsolete) — Splinter Review
Addressed jgilbert's comments.
Attachment #8740817 - Attachment is obsolete: true
Attachment #8741601 - Flags: review?(jgilbert)
Comment on attachment 8741601 [details] [diff] [review]
Check conflicting name.

Review of attachment 8741601 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGLProgram.cpp
@@ +957,5 @@
> +    if (LinkAndUpdate()) {
> +        // Check if the attrib name conflicting to uniform name
> +        for (auto& uniform : mMostRecentLinkInfo->uniformMap) {
> +            if (mMostRecentLinkInfo->attribMap.find(uniform.first) != mMostRecentLinkInfo->attribMap.end()) {
> +                mLinkLog.AssignLiteral("The attribute name conflicts with uniform name.");

Use nsPrintf[C]String to include the conflicting name.
Attachment #8741601 - Flags: review?(jgilbert) → review-
Attached patch Check conflicting name. (obsolete) — Splinter Review
Address jgilbert's comment.
Attachment #8741601 - Attachment is obsolete: true
Attachment #8744129 - Flags: review?(jgilbert)
Attachment #8744129 - Flags: review?(jgilbert)
Attached patch Check conflicting name. (obsolete) — Splinter Review
The previous patch is wrong. This one is corrected.
Attachment #8744129 - Attachment is obsolete: true
Attachment #8744130 - Flags: review?(jgilbert)
Comment on attachment 8744130 [details] [diff] [review]
Check conflicting name.

Review of attachment 8744130 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGLProgram.cpp
@@ +955,5 @@
>      }
>  
> +    if (LinkAndUpdate()) {
> +        // Check if the attrib name conflicting to uniform name
> +        for (auto& uniform : mMostRecentLinkInfo->uniformMap) {

const auto&
Attachment #8744130 - Flags: review?(jgilbert) → review+
Address jgilbert's comment.
Attachment #8744130 - Attachment is obsolete: true
Rebase to master.
Attachment #8744767 - Attachment is obsolete: true
Fix a build error.
Attachment #8744780 - Attachment is obsolete: true
Keywords: checkin-needed
Backed out for unexpected passes in test_conformance__glsl__misc__shaders-with-name-conflicts.

Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/673b6e68925ebca7689072ed42587380ceef6149
Push with issues: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=286171389d121ded03eb541974c58035836b96ad
Issue log: https://treeherder.mozilla.org/logviewer.html#?job_id=26731827&repo=mozilla-inbound

09:00:48     INFO -  605 INFO TEST-START | dom/canvas/test/webgl-conf/generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html
09:00:49     INFO -  JavaScript warning: http://mochi.test:8888/tests/dom/canvas/test/webgl-conf/checkout/conformance/resources/webgl-test-utils.js, line 1287: Error: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.
09:00:49     INFO -  WebGL(0x11cb8e000)::ForceLoseContext
09:00:49     INFO -  JavaScript warning: http://mochi.test:8888/tests/dom/canvas/test/webgl-conf/checkout/conformance/resources/glsl-conformance-test.js, line 169: Error: WebGL: linkProgram: Failed to link, leaving the following log:
09:00:49     INFO -  The uniform name (foo) conflicts with attribute name.
09:00:49     INFO -  606 INFO TEST-FAIL | dom/canvas/test/webgl-conf/generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html | A valid string reason is expected
09:00:49     INFO -  607 INFO TEST-FAIL | dom/canvas/test/webgl-conf/generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html | Reason cannot be empty
09:00:49     INFO -  608 INFO TEST-FAIL | dom/canvas/test/webgl-conf/generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html | shaders with conflicting uniform/attribute names should fail
09:00:49     INFO -  609 INFO TEST-FAIL | dom/canvas/test/webgl-conf/generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html | successfullyParsed is true
09:00:49     INFO -  610 INFO TEST-UNEXPECTED-PASS | dom/canvas/test/webgl-conf/generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html | fail-if condition in manifest - We expected at least one failure
Flags: needinfo?(ethlin)
It's because bug 1193526 upgrade to webgl conformance 1.0.3. I will remove the fail-if flag.
Flags: needinfo?(ethlin)
Fix try server error.
Attachment #8744792 - Attachment is obsolete: true
Fix try server error.
Attachment #8746347 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b4dfa9f7f63c
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: