зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1239126. Handle gl_InstanceID attribute with no location. r=jgilbert
This patch avoids a crash when querying program info when gl_InstanceID is used. ANGLE will return -1 from GetAttribLocation("gl_InstanceID") (this location is hardcoded in the ANGLE source) but still includes gl_InstanceID in it's attribute list.
This commit is contained in:
Родитель
ac809b12d2
Коммит
69e504a564
|
@ -172,10 +172,12 @@ QueryProgramInfo(WebGLProgram* prog, gl::GLContext* gl)
|
|||
|
||||
// Collect active locations:
|
||||
GLint loc = gl->fGetAttribLocation(prog->mGLName, mappedName.BeginReading());
|
||||
if (loc == -1)
|
||||
MOZ_CRASH("Active attrib has no location.");
|
||||
|
||||
info->activeAttribLocs.insert(loc);
|
||||
if (loc == -1) {
|
||||
if (mappedName != "gl_InstanceID")
|
||||
MOZ_CRASH("Active attrib has no location.");
|
||||
} else {
|
||||
info->activeAttribLocs.insert(loc);
|
||||
}
|
||||
}
|
||||
|
||||
// Uniforms
|
||||
|
|
Загрузка…
Ссылка в новой задаче