Bug 1924184 - Fix incorrect rendering with FakeVertexAttrib0 and VertexAttribDivisor. r=gfx-reviewers,lsalzman, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D229097
This commit is contained in:
Kelsey Gilbert 2024-11-15 14:01:36 +00:00
parent a08af0549f
commit acb60184c6

View file

@ -1190,6 +1190,12 @@ bool WebGLContext::DoFakeVertexAttrib0(
}
gl->fEnableVertexAttribArray(0);
{
const auto& attrib0 = mBoundVertexArray->AttribBinding(0);
if (attrib0.layout.divisor) {
gl->fVertexAttribDivisor(0, 0);
}
}
if (!mFakeVertexAttrib0BufferObject) {
gl->fGenBuffers(1, &mFakeVertexAttrib0BufferObject);