Commit 85dc42bf by apatrick@chromium.org

Reset DepthStencilSurface after Context::markAllStateDirty() has been called.

Landing on Vangelis' behalf. Original review: http://codereview.appspot.com/2184041/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@419 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 9e287141
...@@ -314,6 +314,8 @@ void Context::markAllStateDirty() ...@@ -314,6 +314,8 @@ void Context::markAllStateDirty()
{ {
mAppliedRenderTargetSerial = 0; mAppliedRenderTargetSerial = 0;
mAppliedDepthbufferSerial = 0; mAppliedDepthbufferSerial = 0;
mAppliedStencilbufferSerial = 0;
mDepthStencilDirty = true;
mAppliedProgram = 0; mAppliedProgram = 0;
mClearStateDirty = true; mClearStateDirty = true;
...@@ -1605,11 +1607,13 @@ bool Context::applyRenderTarget(bool ignoreViewport) ...@@ -1605,11 +1607,13 @@ bool Context::applyRenderTarget(bool ignoreViewport)
} }
if (depthbufferSerial != mAppliedDepthbufferSerial || if (depthbufferSerial != mAppliedDepthbufferSerial ||
stencilbufferSerial != mAppliedStencilbufferSerial) stencilbufferSerial != mAppliedStencilbufferSerial ||
mDepthStencilDirty)
{ {
device->SetDepthStencilSurface(depthStencil); device->SetDepthStencilSurface(depthStencil);
mAppliedDepthbufferSerial = depthbufferSerial; mAppliedDepthbufferSerial = depthbufferSerial;
mAppliedStencilbufferSerial = stencilbufferSerial; mAppliedStencilbufferSerial = stencilbufferSerial;
mDepthStencilDirty = false;
} }
D3DVIEWPORT9 viewport; D3DVIEWPORT9 viewport;
......
...@@ -454,6 +454,7 @@ class Context ...@@ -454,6 +454,7 @@ class Context
unsigned int mAppliedRenderTargetSerial; unsigned int mAppliedRenderTargetSerial;
unsigned int mAppliedDepthbufferSerial; unsigned int mAppliedDepthbufferSerial;
unsigned int mAppliedStencilbufferSerial; unsigned int mAppliedStencilbufferSerial;
bool mDepthStencilDirty;
bool mSupportsShaderModel3; bool mSupportsShaderModel3;
std::map<D3DFORMAT, bool *> mMultiSampleSupport; std::map<D3DFORMAT, bool *> mMultiSampleSupport;
......
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