зеркало из https://github.com/mozilla/gecko-dev.git
Bug 777028 - honor gfx.work-around-driver-bugs for Mesa WebGL workaround - r=jgilbert
This commit is contained in:
Родитель
51502e4c12
Коммит
c50e6dd0da
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче