Add proper detection for maximum texture and renderbuffer size
Trac #13849

Increased the maximum possible texture & renderbuffer size to 16384 (the minimum required for DX11 cards).
Limit the actual maximum texture & renderbuffer size to the maximum
that it reported by the underlying D3D9 device.

Note that creating textures and renderbuffers at the maximum size will quickly exhaust video memory!

Signed-off-by: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@447 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index 05632c4..9128f13 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -996,7 +996,7 @@
 
         // Purge all the levels and the texture.
 
-        for (int i = 0; i < MAX_TEXTURE_LEVELS; i++)
+        for (int i = 0; i < IMPLEMENTATION_MAX_TEXTURE_LEVELS; i++)
         {
             if (mImageArray[i].surface != NULL)
             {
@@ -1831,7 +1831,7 @@
               internalFormat, width);
 
         // Purge all the levels and the texture.
-        for (int i = 0; i < MAX_TEXTURE_LEVELS; i++)
+        for (int i = 0; i < IMPLEMENTATION_MAX_TEXTURE_LEVELS; i++)
         {
             for (int f = 0; f < 6; f++)
             {