зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1022272 - Lets WebGL's draw{Arrays,Elements}() generate INVALID_OPERATION when all vertex attributes' divisor are different of 0 - r=jgilbert
This commit is contained in:
Родитель
b6dc700759
Коммит
14c900d098
|
@ -111,6 +111,11 @@ bool WebGLContext::DrawArrays_check(GLint first, GLsizei count, GLsizei primcoun
|
||||||
if (!DoFakeVertexAttrib0(checked_firstPlusCount.value())) {
|
if (!DoFakeVertexAttrib0(checked_firstPlusCount.value())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!DrawInstanced_check(info)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
BindFakeBlackTextures();
|
BindFakeBlackTextures();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -146,9 +151,6 @@ WebGLContext::DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsiz
|
||||||
if (!DrawArrays_check(first, count, primcount, "drawArraysInstanced"))
|
if (!DrawArrays_check(first, count, primcount, "drawArraysInstanced"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!DrawInstanced_check("drawArraysInstanced"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
RunContextLossTimer();
|
RunContextLossTimer();
|
||||||
gl->fDrawArraysInstanced(mode, first, count, primcount);
|
gl->fDrawArraysInstanced(mode, first, count, primcount);
|
||||||
|
|
||||||
|
@ -282,6 +284,11 @@ WebGLContext::DrawElements_check(GLsizei count, GLenum type,
|
||||||
if (!DoFakeVertexAttrib0(mMaxFetchedVertices)) {
|
if (!DoFakeVertexAttrib0(mMaxFetchedVertices)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!DrawInstanced_check(info)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
BindFakeBlackTextures();
|
BindFakeBlackTextures();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -329,9 +336,6 @@ WebGLContext::DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
|
||||||
if (!DrawElements_check(count, type, byteOffset, primcount, "drawElementsInstanced"))
|
if (!DrawElements_check(count, type, byteOffset, primcount, "drawElementsInstanced"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!DrawInstanced_check("drawElementsInstanced"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
RunContextLossTimer();
|
RunContextLossTimer();
|
||||||
gl->fDrawElementsInstanced(mode, count, type, reinterpret_cast<GLvoid*>(byteOffset), primcount);
|
gl->fDrawElementsInstanced(mode, count, type, reinterpret_cast<GLvoid*>(byteOffset), primcount);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче