Fix multi-sample state management.

Issue=160 TRAC #16817 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@681 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent d6e74da1
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 680 #define BUILD_REVISION 681
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -1869,6 +1869,7 @@ void Context::applyState(GLenum drawMode) ...@@ -1869,6 +1869,7 @@ void Context::applyState(GLenum drawMode)
} }
mStencilStateDirty = false; mStencilStateDirty = false;
mFrontFaceDirty = false;
} }
if (mMaskStateDirty) if (mMaskStateDirty)
...@@ -1903,8 +1904,6 @@ void Context::applyState(GLenum drawMode) ...@@ -1903,8 +1904,6 @@ void Context::applyState(GLenum drawMode)
if (mSampleStateDirty) if (mSampleStateDirty)
{ {
if (framebufferObject->isMultisample())
{
if (mState.sampleAlphaToCoverage) if (mState.sampleAlphaToCoverage)
{ {
FIXME("Sample alpha to coverage is unimplemented."); FIXME("Sample alpha to coverage is unimplemented.");
...@@ -1941,11 +1940,6 @@ void Context::applyState(GLenum drawMode) ...@@ -1941,11 +1940,6 @@ void Context::applyState(GLenum drawMode)
{ {
device->SetRenderState(D3DRS_MULTISAMPLEMASK, 0xFFFFFFFF); device->SetRenderState(D3DRS_MULTISAMPLEMASK, 0xFFFFFFFF);
} }
}
else
{
device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE);
}
mSampleStateDirty = false; mSampleStateDirty = false;
} }
...@@ -1956,8 +1950,6 @@ void Context::applyState(GLenum drawMode) ...@@ -1956,8 +1950,6 @@ void Context::applyState(GLenum drawMode)
mDitherStateDirty = false; mDitherStateDirty = false;
} }
mFrontFaceDirty = false;
} }
GLenum Context::applyVertexBuffer(GLint first, GLsizei count) GLenum Context::applyVertexBuffer(GLint first, GLsizei count)
......
...@@ -268,23 +268,6 @@ bool Framebuffer::hasStencil() ...@@ -268,23 +268,6 @@ bool Framebuffer::hasStencil()
return false; return false;
} }
bool Framebuffer::isMultisample()
{
// If the framebuffer is not complete, attachment samples may be mismatched, and it
// cannot be used as a multisample framebuffer. If it is complete, it is required to
// have a color attachment, and all its attachments must have the same number of samples,
// so the number of samples for the colorbuffer will indicate whether the framebuffer is
// multisampled.
if (completeness() == GL_FRAMEBUFFER_COMPLETE && getColorbuffer()->getSamples() > 0)
{
return true;
}
else
{
return false;
}
}
GLenum Framebuffer::completeness() GLenum Framebuffer::completeness()
{ {
int width = 0; int width = 0;
......
...@@ -59,7 +59,6 @@ class Framebuffer ...@@ -59,7 +59,6 @@ class Framebuffer
GLuint getStencilbufferHandle(); GLuint getStencilbufferHandle();
bool hasStencil(); bool hasStencil();
bool isMultisample();
int getSamples(); int getSamples();
virtual GLenum completeness(); virtual GLenum completeness();
......
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