Commit ca128c7c by Jiajia Qin Committed by Commit Bot

Fix no VAO bound error in Draw*Indirect

In Intel Mesa driver, dEQP-GLES31.functional.draw_indirect.random.28 is faild because of no VAO bound. This patch will fix it by adding VAO binding. BUG=angleproject:1595 TEST=dEQP-GLES31.functional.draw_indirect.random.28 Change-Id: I8e4616bc4685839efe299d2a4fad65fa73fde641 Reviewed-on: https://chromium-review.googlesource.com/423438Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 3311d474
...@@ -666,12 +666,14 @@ gl::Error StateManagerGL::setDrawIndirectState(const gl::ContextState &data, GLe ...@@ -666,12 +666,14 @@ gl::Error StateManagerGL::setDrawIndirectState(const gl::ContextState &data, GLe
{ {
const gl::State &state = data.getState(); const gl::State &state = data.getState();
const gl::VertexArray *vao = state.getVertexArray();
const VertexArrayGL *vaoGL = GetImplAs<VertexArrayGL>(vao);
if (type != GL_NONE) if (type != GL_NONE)
{ {
const gl::VertexArray *vao = state.getVertexArray();
const VertexArrayGL *vaoGL = GetImplAs<VertexArrayGL>(vao);
ANGLE_TRY(vaoGL->syncElementArrayState()); ANGLE_TRY(vaoGL->syncElementArrayState());
} }
bindVertexArray(vaoGL->getVertexArrayID(), vaoGL->getAppliedElementArrayBufferID());
gl::Buffer *drawIndirectBuffer = state.getDrawIndirectBuffer(); gl::Buffer *drawIndirectBuffer = state.getDrawIndirectBuffer();
ASSERT(drawIndirectBuffer); ASSERT(drawIndirectBuffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment