Bug 1264214 - WebGL check the conflict name when LinkProgram. r=jgilbert

This commit is contained in:
Ethan Lin committed 2016-04-28 06:10:00 -04:00
1 parent de75ebd62a
commit 251192675f
3 files changed
+13 -3

No files matched your search

+13 -1
View File
@@ -955,7 +955,19 @@ WebGLProgram::LinkProgram()
}
LinkAndUpdate();
if (IsLinked())
if (IsLinked()) {
// Check if the attrib name conflicting to uniform name
for (const auto& uniform : mMostRecentLinkInfo->uniformMap) {
if (mMostRecentLinkInfo->attribMap.find(uniform.first) != mMostRecentLinkInfo->attribMap.end()) {
mLinkLog = nsPrintfCString("The uniform name (%s) conflicts with attribute name.",
uniform.first.get());
mMostRecentLinkInfo = nullptr;
break;
}
}
}
if (mMostRecentLinkInfo)
return;
// Failed link.
@@ -2743,7 +2743,6 @@ fail-if = 1
[generated/test_conformance__glsl__misc__shaders-with-mis-matching-varyings.html]
[generated/test_conformance__glsl__misc__shaders-with-missing-varyings.html]
[generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html]
fail-if = 1
[generated/test_conformance__glsl__misc__shaders-with-uniform-structs.html]
[generated/test_conformance__glsl__misc__shaders-with-varyings.html]
[generated/test_conformance__glsl__misc__shared.html]
@@ -37,7 +37,6 @@ fail-if = 1
[generated/test_conformance__glsl__misc__shaders-with-invariance.html]
fail-if = 1
[generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html]
fail-if = 1
[generated/test_conformance__renderbuffers__feedback-loop.html]
fail-if = 1
[generated/test_conformance__textures__texture-copying-feedback-loops.html]