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
parent d5df4e8c
...@@ -29,7 +29,7 @@ TextureStorage11::TextureStorage11(Renderer *renderer, UINT bindFlags) ...@@ -29,7 +29,7 @@ TextureStorage11::TextureStorage11(Renderer *renderer, UINT bindFlags)
TextureStorage11::~TextureStorage11() TextureStorage11::~TextureStorage11()
{ {
} }
TextureStorage11 *TextureStorage11::makeTextureStorage11(TextureStorage *storage) TextureStorage11 *TextureStorage11::makeTextureStorage11(TextureStorage *storage)
{ {
...@@ -209,6 +209,9 @@ TextureStorage11_2D::~TextureStorage11_2D() ...@@ -209,6 +209,9 @@ TextureStorage11_2D::~TextureStorage11_2D()
{ {
if (mTexture) if (mTexture)
mTexture->Release(); mTexture->Release();
if (mSRV)
mSRV->Release();
} }
TextureStorage11_2D *TextureStorage11_2D::makeTextureStorage11_2D(TextureStorage *storage) TextureStorage11_2D *TextureStorage11_2D::makeTextureStorage11_2D(TextureStorage *storage)
...@@ -356,6 +359,9 @@ TextureStorage11_Cube::~TextureStorage11_Cube() ...@@ -356,6 +359,9 @@ TextureStorage11_Cube::~TextureStorage11_Cube()
{ {
if (mTexture) if (mTexture)
mTexture->Release(); mTexture->Release();
if (mSRV)
mSRV->Release();
} }
TextureStorage11_Cube *TextureStorage11_Cube::makeTextureStorage11_Cube(TextureStorage *storage) TextureStorage11_Cube *TextureStorage11_Cube::makeTextureStorage11_Cube(TextureStorage *storage)
......
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