Removed the dirty parameters flag from Texture.

TRAC #22248 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1699 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent e33c8bfa
...@@ -36,7 +36,6 @@ Texture::Texture(rx::Renderer *renderer, GLuint id) : RefCountObject(id) ...@@ -36,7 +36,6 @@ Texture::Texture(rx::Renderer *renderer, GLuint id) : RefCountObject(id)
mSamplerState.wrapT = GL_REPEAT; mSamplerState.wrapT = GL_REPEAT;
mSamplerState.maxAnisotropy = 1.0f; mSamplerState.maxAnisotropy = 1.0f;
mSamplerState.lodOffset = 0; mSamplerState.lodOffset = 0;
mDirtyParameters = true;
mUsage = GL_NONE; mUsage = GL_NONE;
mDirtyImages = true; mDirtyImages = true;
...@@ -59,14 +58,8 @@ bool Texture::setMinFilter(GLenum filter) ...@@ -59,14 +58,8 @@ bool Texture::setMinFilter(GLenum filter)
case GL_LINEAR_MIPMAP_NEAREST: case GL_LINEAR_MIPMAP_NEAREST:
case GL_NEAREST_MIPMAP_LINEAR: case GL_NEAREST_MIPMAP_LINEAR:
case GL_LINEAR_MIPMAP_LINEAR: case GL_LINEAR_MIPMAP_LINEAR:
{ mSamplerState.minFilter = filter;
if (mSamplerState.minFilter != filter) return true;
{
mSamplerState.minFilter = filter;
mDirtyParameters = true;
}
return true;
}
default: default:
return false; return false;
} }
...@@ -79,14 +72,8 @@ bool Texture::setMagFilter(GLenum filter) ...@@ -79,14 +72,8 @@ bool Texture::setMagFilter(GLenum filter)
{ {
case GL_NEAREST: case GL_NEAREST:
case GL_LINEAR: case GL_LINEAR:
{ mSamplerState.magFilter = filter;
if (mSamplerState.magFilter != filter) return true;
{
mSamplerState.magFilter = filter;
mDirtyParameters = true;
}
return true;
}
default: default:
return false; return false;
} }
...@@ -100,14 +87,8 @@ bool Texture::setWrapS(GLenum wrap) ...@@ -100,14 +87,8 @@ bool Texture::setWrapS(GLenum wrap)
case GL_REPEAT: case GL_REPEAT:
case GL_CLAMP_TO_EDGE: case GL_CLAMP_TO_EDGE:
case GL_MIRRORED_REPEAT: case GL_MIRRORED_REPEAT:
{ mSamplerState.wrapS = wrap;
if (mSamplerState.wrapS != wrap) return true;
{
mSamplerState.wrapS = wrap;
mDirtyParameters = true;
}
return true;
}
default: default:
return false; return false;
} }
...@@ -121,14 +102,8 @@ bool Texture::setWrapT(GLenum wrap) ...@@ -121,14 +102,8 @@ bool Texture::setWrapT(GLenum wrap)
case GL_REPEAT: case GL_REPEAT:
case GL_CLAMP_TO_EDGE: case GL_CLAMP_TO_EDGE:
case GL_MIRRORED_REPEAT: case GL_MIRRORED_REPEAT:
{ mSamplerState.wrapT = wrap;
if (mSamplerState.wrapT != wrap) return true;
{
mSamplerState.wrapT = wrap;
mDirtyParameters = true;
}
return true;
}
default: default:
return false; return false;
} }
...@@ -142,11 +117,9 @@ bool Texture::setMaxAnisotropy(float textureMaxAnisotropy, float contextMaxAniso ...@@ -142,11 +117,9 @@ bool Texture::setMaxAnisotropy(float textureMaxAnisotropy, float contextMaxAniso
{ {
return false; return false;
} }
if (mSamplerState.maxAnisotropy != textureMaxAnisotropy)
{ mSamplerState.maxAnisotropy = textureMaxAnisotropy;
mSamplerState.maxAnisotropy = textureMaxAnisotropy;
mDirtyParameters = true;
}
return true; return true;
} }
...@@ -276,11 +249,6 @@ rx::TextureStorageInterface *Texture::getNativeTexture() ...@@ -276,11 +249,6 @@ rx::TextureStorageInterface *Texture::getNativeTexture()
return storage; return storage;
} }
bool Texture::hasDirtyParameters() const
{
return mDirtyParameters;
}
bool Texture::hasDirtyImages() const bool Texture::hasDirtyImages() const
{ {
return mDirtyImages; return mDirtyImages;
...@@ -288,7 +256,6 @@ bool Texture::hasDirtyImages() const ...@@ -288,7 +256,6 @@ bool Texture::hasDirtyImages() const
void Texture::resetDirty() void Texture::resetDirty()
{ {
mDirtyParameters = false;
mDirtyImages = false; mDirtyImages = false;
} }
......
...@@ -115,7 +115,6 @@ class Texture : public RefCountObject ...@@ -115,7 +115,6 @@ class Texture : public RefCountObject
rx::Renderer *mRenderer; rx::Renderer *mRenderer;
SamplerState mSamplerState; SamplerState mSamplerState;
bool mDirtyParameters;
GLenum mUsage; GLenum mUsage;
bool mDirtyImages; bool mDirtyImages;
......
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