Fixed issues with state force flag initialization and applyRenderTarget placement.

TRAC #22041 Fixed the state force flags being incorrectly initialized in Renderer9's destructor, they are now in the constructor. Renderer::applyRenderTarget is now correctly called fromt he begining of Context::applyRenderTarget instead of the end. Signed-off-by: Daniel Koch Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1425 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 2e258644
...@@ -1751,6 +1751,8 @@ bool Context::applyRenderTarget(bool ignoreViewport) ...@@ -1751,6 +1751,8 @@ bool Context::applyRenderTarget(bool ignoreViewport)
return error(GL_INVALID_FRAMEBUFFER_OPERATION, false); return error(GL_INVALID_FRAMEBUFFER_OPERATION, false);
} }
mRenderer->applyRenderTarget(framebufferObject);
// if there is no color attachment we must synthesize a NULL colorattachment // if there is no color attachment we must synthesize a NULL colorattachment
// to keep the D3D runtime happy. This should only be possible if depth texturing. // to keep the D3D runtime happy. This should only be possible if depth texturing.
Renderbuffer *renderbufferObject = NULL; Renderbuffer *renderbufferObject = NULL;
...@@ -1904,8 +1906,6 @@ bool Context::applyRenderTarget(bool ignoreViewport) ...@@ -1904,8 +1906,6 @@ bool Context::applyRenderTarget(bool ignoreViewport)
mDxUniformsDirty = false; mDxUniformsDirty = false;
} }
mRenderer->applyRenderTarget(framebufferObject);
return true; return true;
} }
......
...@@ -79,6 +79,11 @@ Renderer9::Renderer9(egl::Display *display, HDC hDc, bool softwareDevice) : Rend ...@@ -79,6 +79,11 @@ Renderer9::Renderer9(egl::Display *display, HDC hDc, bool softwareDevice) : Rend
mDeviceLost = false; mDeviceLost = false;
mMaxSupportedSamples = 0; mMaxSupportedSamples = 0;
mForceSetDepthStencilState = true;
mForceSetRasterState = true;
mForceSetBlendState = true;
mForceSetScissor = true;
} }
Renderer9::~Renderer9() Renderer9::~Renderer9()
...@@ -133,11 +138,6 @@ Renderer9::~Renderer9() ...@@ -133,11 +138,6 @@ Renderer9::~Renderer9()
delete [] mMultiSampleSupport.begin()->second; delete [] mMultiSampleSupport.begin()->second;
mMultiSampleSupport.erase(mMultiSampleSupport.begin()); mMultiSampleSupport.erase(mMultiSampleSupport.begin());
} }
mForceSetDepthStencilState = true;
mForceSetRasterState = true;
mForceSetBlendState = true;
mForceSetScissor = true;
} }
EGLint Renderer9::initialize() EGLint Renderer9::initialize()
......
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