When creating ShaderResourceViews, -1 should be used for 'all MipLevels', not 0.

TRAC #22337

Author: Shannon Woods
Signed-off-by: Geoff Lang
Signed-off-by: Daniel Koch

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1670 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/TextureStorage11.cpp b/src/libGLESv2/renderer/TextureStorage11.cpp
index 61d2429..52aed22 100644
--- a/src/libGLESv2/renderer/TextureStorage11.cpp
+++ b/src/libGLESv2/renderer/TextureStorage11.cpp
@@ -282,7 +282,7 @@
         srvDesc.Format = format;
         srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
         srvDesc.Texture2D.MostDetailedMip = 0;
-        srvDesc.Texture2D.MipLevels = levels;
+        srvDesc.Texture2D.MipLevels = (levels == 0 ? -1 : levels);
 
         ID3D11Device *device = mRenderer->getDevice();
         HRESULT result = device->CreateShaderResourceView(mTexture, &srvDesc, &mSRV);
@@ -427,7 +427,7 @@
         D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
         srvDesc.Format = format;
         srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE;
-        srvDesc.TextureCube.MipLevels = levels;
+        srvDesc.TextureCube.MipLevels = (levels == 0 ? -1 : levels);
         srvDesc.TextureCube.MostDetailedMip = 0;
 
         ID3D11Device *device = mRenderer->getDevice();