Limit max renderbuffer size to avoid too-large allocations
authorMark Adams <marka@nvidia.com>
Wed, 13 Sep 2017 18:54:40 +0000 (14:54 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 26 Sep 2017 13:08:39 +0000 (09:08 -0400)
This brings the ES2 version of this test in-line with the ES3 version
in order to avoid hitting address-space limitations with very large max sizes
in 32-bit mode.

VK-GL-CTS issue: 687

Affects:
dEQP-GLES2.functional.state_query.rbo.renderbuffer_size

Change-Id: Id3a0be7e8e2e6aaf3dcb6d9cd2b1c4a9a19d4baf

modules/gles2/functional/es2fRboStateQueryTests.cpp

index b49bbf5..f5dc50c 100644 (file)
@@ -122,15 +122,11 @@ public:
                checkRenderbufferParam(m_testCtx, *this, GL_RENDERBUFFER_HEIGHT,        0);
                expectError(GL_NO_ERROR);
 
-               int maxRenderbufferSize = 1;
-               glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &maxRenderbufferSize);
-               expectError(GL_NO_ERROR);
-
                const int numIterations = 30;
                for (int i = 0; i < numIterations; ++i)
                {
-                       const GLint w = rnd.getInt(0, maxRenderbufferSize);
-                       const GLint h = rnd.getInt(0, maxRenderbufferSize);
+                       const GLint w = rnd.getInt(0, 128);
+                       const GLint h = rnd.getInt(0, 128);
 
                        glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA4, w, h);
                        expectError(GL_NO_ERROR);