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

This commit is contained in:
Ethan Lin 2016-04-28 06:10:00 -04:00
Родитель 49a6b9b48d
Коммит a929c63894
3 изменённых файлов: 13 добавлений и 3 удалений

Просмотреть файл

@ -955,7 +955,19 @@ WebGLProgram::LinkProgram()
} }
LinkAndUpdate(); 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; return;
// Failed link. // 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-mis-matching-varyings.html]
[generated/test_conformance__glsl__misc__shaders-with-missing-varyings.html] [generated/test_conformance__glsl__misc__shaders-with-missing-varyings.html]
[generated/test_conformance__glsl__misc__shaders-with-name-conflicts.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-uniform-structs.html]
[generated/test_conformance__glsl__misc__shaders-with-varyings.html] [generated/test_conformance__glsl__misc__shaders-with-varyings.html]
[generated/test_conformance__glsl__misc__shared.html] [generated/test_conformance__glsl__misc__shared.html]

Просмотреть файл

@ -37,7 +37,6 @@ fail-if = 1
[generated/test_conformance__glsl__misc__shaders-with-invariance.html] [generated/test_conformance__glsl__misc__shaders-with-invariance.html]
fail-if = 1 fail-if = 1
[generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html] [generated/test_conformance__glsl__misc__shaders-with-name-conflicts.html]
fail-if = 1
[generated/test_conformance__renderbuffers__feedback-loop.html] [generated/test_conformance__renderbuffers__feedback-loop.html]
fail-if = 1 fail-if = 1
[generated/test_conformance__textures__texture-copying-feedback-loops.html] [generated/test_conformance__textures__texture-copying-feedback-loops.html]