Bug 777028 - honor gfx.work-around-driver-bugs for Mesa WebGL workaround - r=jgilbert

This commit is contained in:
Benoit Jacob 2012-08-23 14:56:17 -04:00
Родитель 51502e4c12
Коммит c50e6dd0da
1 изменённых файлов: 8 добавлений и 8 удалений

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

@ -3706,7 +3706,7 @@ WebGLContext::LinkProgram(WebGLProgram *program, ErrorResult& rv)
if (!ValidateObject("linkProgram", program))
return;
GLuint progname = program->GLName();
if (!program->NextGeneration()) {
@ -3722,13 +3722,13 @@ WebGLContext::LinkProgram(WebGLProgram *program, ErrorResult& rv)
// bug 777028
// Mesa can't handle more than 16 samplers per program, counting each array entry.
if (mIsMesa) {
if (program->UpperBoundNumSamplerUniforms() > 16) {
GenerateWarning("Programs with more than 16 samplers are disallowed on Mesa drivers "
"to avoid a Mesa crasher.");
program->SetLinkStatus(false);
return;
}
if (gl->WorkAroundDriverBugs() &&
mIsMesa &&
program->UpperBoundNumSamplerUniforms() > 16)
{
GenerateWarning("Programs with more than 16 samplers are disallowed on Mesa drivers " "to avoid a Mesa crasher.");
program->SetLinkStatus(false);
return;
}
GLint ok;