Commit b5e884a4 by Shahmeer Esmail Committed by Commit Bot

Clear11 VerticesTransform, RasterizerStates, ScissorRect

- Skip clears if an empty scissor rect is set - Use rastStates to apply scissoring instead of recomputing the scissored positions and updating the VB and updating the VB for every clear - Use ComPtrs for VB and RasterizerStates BUG=angleproject:1934 Change-Id: Ib4448d8568b465df5de57607be4985095f6bd014 Reviewed-on: https://chromium-review.googlesource.com/453881 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 420ba154
...@@ -63,16 +63,17 @@ class Clear11 : angle::NonCopyable ...@@ -63,16 +63,17 @@ class Clear11 : angle::NonCopyable
Renderer11 *mRenderer; Renderer11 *mRenderer;
// Cached cache Keys // States
angle::ComPtr<ID3D11RasterizerState> mScissorEnabledRasterizerState;
angle::ComPtr<ID3D11RasterizerState> mScissorDisabledRasterizerState;
gl::DepthStencilState mDepthStencilStateKey; gl::DepthStencilState mDepthStencilStateKey;
d3d11::BlendStateKey mBlendStateKey; d3d11::BlendStateKey mBlendStateKey;
// Shaders and Shader Resources
ClearShader *mFloatClearShader; ClearShader *mFloatClearShader;
ClearShader *mUintClearShader; ClearShader *mUintClearShader;
ClearShader *mIntClearShader; ClearShader *mIntClearShader;
angle::ComPtr<ID3D11Buffer> mVertexBuffer;
ID3D11Buffer *mVertexBuffer;
ID3D11RasterizerState *mRasterizerState;
}; };
} }
......
...@@ -170,11 +170,13 @@ gl::Error RenderStateCache::getBlendState(const d3d11::BlendStateKey &key, ...@@ -170,11 +170,13 @@ gl::Error RenderStateCache::getBlendState(const d3d11::BlendStateKey &key,
// Create a new blend state and insert it into the cache // Create a new blend state and insert it into the cache
D3D11_BLEND_DESC blendDesc; D3D11_BLEND_DESC blendDesc;
D3D11_RENDER_TARGET_BLEND_DESC &rtDesc0 = blendDesc.RenderTarget[0]; D3D11_RENDER_TARGET_BLEND_DESC &rtDesc0 = blendDesc.RenderTarget[0];
rtDesc0 = {};
const gl::BlendState &blendState = key.blendState; const gl::BlendState &blendState = key.blendState;
blendDesc.AlphaToCoverageEnable = blendState.sampleAlphaToCoverage; blendDesc.AlphaToCoverageEnable = blendState.sampleAlphaToCoverage;
blendDesc.IndependentBlendEnable = key.mrt ? TRUE : FALSE; blendDesc.IndependentBlendEnable = key.mrt ? TRUE : FALSE;
rtDesc0 = {};
if (blendState.blend) if (blendState.blend)
{ {
rtDesc0.BlendEnable = true; rtDesc0.BlendEnable = true;
......
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