Release leaked SRVs in TextureStorage11.
TRAC #22231
Signed-off-by: Jamie Madill
Signed-off-by: Daniel Koch
Author: Geoff Lang
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1697 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/TextureStorage11.cpp b/src/libGLESv2/renderer/TextureStorage11.cpp
index 1c12279..a3902fb 100644
--- a/src/libGLESv2/renderer/TextureStorage11.cpp
+++ b/src/libGLESv2/renderer/TextureStorage11.cpp
@@ -29,7 +29,7 @@
TextureStorage11::~TextureStorage11()
{
-}
+}
TextureStorage11 *TextureStorage11::makeTextureStorage11(TextureStorage *storage)
{
@@ -209,6 +209,9 @@
{
if (mTexture)
mTexture->Release();
+
+ if (mSRV)
+ mSRV->Release();
}
TextureStorage11_2D *TextureStorage11_2D::makeTextureStorage11_2D(TextureStorage *storage)
@@ -356,6 +359,9 @@
{
if (mTexture)
mTexture->Release();
+
+ if (mSRV)
+ mSRV->Release();
}
TextureStorage11_Cube *TextureStorage11_Cube::makeTextureStorage11_Cube(TextureStorage *storage)