Commit 366db7cd by Austin Kinross Committed by Jamie Madill

Prevent usage of GSSetConstantBuffers on D3D11 Feature Level 9_3

Calling GSSetConstantBuffers with real data causes a device removed error on 9_3. We therefore ensure that ANGLE doesn't call it on 9_3. Change-Id: I151a74ee7ea81fc4b795d8bf10d5e5c42bfe7c86 Reviewed-on: https://chromium-review.googlesource.com/236042Tested-by: 's avatarAustin Kinross <aukinros@microsoft.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 2609bf4c
......@@ -1743,11 +1743,15 @@ gl::Error Renderer11::applyUniforms(const ProgramImpl &program, const std::vecto
memcpy(&mAppliedPixelConstants, &mPixelConstants, sizeof(dx_PixelConstants));
}
// needed for the point sprite geometry shader
if (mCurrentGeometryConstantBuffer != mDriverConstantBufferPS)
// GSSetConstantBuffers triggers device removal on 9_3, so we should only call it if necessary
if (programD3D->usesGeometryShader())
{
mDeviceContext->GSSetConstantBuffers(0, 1, &mDriverConstantBufferPS);
mCurrentGeometryConstantBuffer = mDriverConstantBufferPS;
// needed for the point sprite geometry shader
if (mCurrentGeometryConstantBuffer != mDriverConstantBufferPS)
{
mDeviceContext->GSSetConstantBuffers(0, 1, &mDriverConstantBufferPS);
mCurrentGeometryConstantBuffer = mDriverConstantBufferPS;
}
}
return gl::Error(GL_NO_ERROR);
......
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