Commit 5c307292 by Jamie Madill Committed by Commit Bot

Consolidate Index buffer application.

Was used in a couple other places. BUG=angleproject:2052 Change-Id: Ib335271a42c9569bbb452b6de8b683023cfc5900 Reviewed-on: https://chromium-review.googlesource.com/659399 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 2cedb58c
......@@ -796,7 +796,7 @@ gl::Error Clear11::clearFramebuffer(const gl::Context *context,
stateManager->setPixelConstantBuffer(0, &mConstantBuffer);
// Bind IL & VB if needed
deviceContext->IASetIndexBuffer(nullptr, DXGI_FORMAT_UNKNOWN, 0);
stateManager->setIndexBuffer(nullptr, DXGI_FORMAT_UNKNOWN, 0, false);
stateManager->setInputLayout(il);
if (useVertexBuffer())
......
......@@ -126,9 +126,7 @@ gl::Error InputLayoutCache::applyVertexBuffers(
GLint start,
TranslatedIndexData *indexInfo)
{
ID3D11DeviceContext *deviceContext = renderer->getDeviceContext();
auto *stateManager = renderer->getStateManager();
auto *stateManager = renderer->getStateManager();
gl::Program *program = state.getProgram();
ProgramD3D *programD3D = GetImplAs<ProgramD3D>(program);
......@@ -261,7 +259,8 @@ gl::Error InputLayoutCache::applyVertexBuffers(
// non-indexed rendering path in ANGLE (DrawArrays). This means that applyIndexBuffer()
// on the renderer will not be called and setting this buffer here ensures that the
// rendering path will contain the correct index buffers.
deviceContext->IASetIndexBuffer(mPointSpriteIndexBuffer.get(), DXGI_FORMAT_R16_UINT, 0);
stateManager->setIndexBuffer(mPointSpriteIndexBuffer.get(), DXGI_FORMAT_R16_UINT, 0,
false);
}
}
......
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