Make sure the driver knows the texture is dirty when only lower level mipmaps are updated.

TRAC #21588 Issue=353 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1287 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 8abd0b79
...@@ -1440,6 +1440,11 @@ IDirect3DSurface9 *TextureStorage2D::getSurfaceLevel(int level) ...@@ -1440,6 +1440,11 @@ IDirect3DSurface9 *TextureStorage2D::getSurfaceLevel(int level)
{ {
HRESULT result = mTexture->GetSurfaceLevel(level + mLodOffset, &surface); HRESULT result = mTexture->GetSurfaceLevel(level + mLodOffset, &surface);
ASSERT(SUCCEEDED(result)); ASSERT(SUCCEEDED(result));
if (level != 0)
{
mTexture->AddDirtyRect(NULL);
}
} }
return surface; return surface;
...@@ -2164,8 +2169,14 @@ IDirect3DSurface9 *TextureStorageCubeMap::getCubeMapSurface(GLenum faceTarget, i ...@@ -2164,8 +2169,14 @@ IDirect3DSurface9 *TextureStorageCubeMap::getCubeMapSurface(GLenum faceTarget, i
if (mTexture) if (mTexture)
{ {
HRESULT result = mTexture->GetCubeMapSurface(es2dx::ConvertCubeFace(faceTarget), level + mLodOffset, &surface); D3DCUBEMAP_FACES face = es2dx::ConvertCubeFace(faceTarget);
HRESULT result = mTexture->GetCubeMapSurface(face, level + mLodOffset, &surface);
ASSERT(SUCCEEDED(result)); ASSERT(SUCCEEDED(result));
if (level != 0)
{
mTexture->AddDirtyRect(face, NULL);
}
} }
return surface; return surface;
......
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