Bug 814171 - Intercept calls for maximum texture/framebuffer sizes in GLContext::fGetIntegerv r=jgilbert
authorGeorge Wright <gwright@mozilla.com>
Tue, 13 Nov 2012 17:35:35 -0500
changeset 114063 b3e4fc8a5f81bab5ae908927e5f5b96bcb917109
parent 114062 6112e96c1ffc988245dfcb3736b19e410526bf6d
child 114064 8fdd86263b2fdcece4289c3331877fe3a280edef
push id18526
push usergwright@mozilla.com
push dateFri, 23 Nov 2012 05:42:22 +0000
treeherdermozilla-inbound@8fdd86263b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs814171
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 814171 - Intercept calls for maximum texture/framebuffer sizes in GLContext::fGetIntegerv r=jgilbert
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -500,19 +500,19 @@ GLContext::InitWithPrefix(const char *pr
         GLint v[4];
 
         fGetIntegerv(LOCAL_GL_SCISSOR_BOX, v);
         mScissorStack.AppendElement(nsIntRect(v[0], v[1], v[2], v[3]));
 
         fGetIntegerv(LOCAL_GL_VIEWPORT, v);
         mViewportStack.AppendElement(nsIntRect(v[0], v[1], v[2], v[3]));
 
-        fGetIntegerv(LOCAL_GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
-        fGetIntegerv(LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE, &mMaxCubeMapTextureSize);
-        fGetIntegerv(LOCAL_GL_MAX_RENDERBUFFER_SIZE, &mMaxRenderbufferSize);
+        raw_fGetIntegerv(LOCAL_GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
+        raw_fGetIntegerv(LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE, &mMaxCubeMapTextureSize);
+        raw_fGetIntegerv(LOCAL_GL_MAX_RENDERBUFFER_SIZE, &mMaxRenderbufferSize);
 
 #ifdef XP_MACOSX
         if (mWorkAroundDriverBugs &&
             mVendor == VendorIntel) {
             // see bug 737182 for 2D textures, bug 684822 for cube map textures.
             mMaxTextureSize        = NS_MIN(mMaxTextureSize,        4096);
             mMaxCubeMapTextureSize = NS_MIN(mMaxCubeMapTextureSize, 512);
             // for good measure, we align renderbuffers on what we do for 2D textures
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -1072,16 +1072,28 @@ public:
             case LOCAL_GL_FRAMEBUFFER_BINDING:
                 *params = GetUserBoundDrawFBO();
                 break;
 
             case LOCAL_GL_READ_FRAMEBUFFER_BINDING_EXT:
                 *params = GetUserBoundReadFBO();
                 break;
 
+            case LOCAL_GL_MAX_TEXTURE_SIZE:
+                *params = mMaxTextureSize;
+                break;
+
+            case LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE:
+                *params = mMaxCubeMapTextureSize;
+                break;
+
+            case LOCAL_GL_MAX_RENDERBUFFER_SIZE:
+                *params = mMaxRenderbufferSize;
+                break;
+
             default:
                 raw_fGetIntegerv(pname, params);
                 break;
         }
     }
 
 #ifdef DEBUG
     // See comment near BindInternalDrawFBO()