On Tue, Feb 28, 2012 at 12:26 PM, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This test tries to create the maximum supported texture using<br>
gltexImage1D/2D/3D functions and later modifies it using<br>
glTexSubImage1D/2D/3D functions.<br>
<br>
At the moment Intel driver throws GL_OUT_OF_MEMORY and an assertion<br>
failure / a segmentation fault with large textures.<br>
<br>
Test reproduces the errors reported in:<br>
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=44970" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=44970</a><br>
<div class="im"><a href="https://bugs.freedesktop.org/show_bug.cgi?id=46303" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=46303</a><br>
<br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
</div><div class="im">---<br>
V3: Added the test using proxy textures, deleted redundant code,<br>
data array allocation based on size returned<br>
<br>
</div>V4: Continue testing with other formats if ARB_texture_float is not present.<br>
Moved the test case to tests/texturing with an appropriate name.<br>
Removed the loop which was testing with a number of large textures.<br>
Added GL_OUT_OF_MEMORY as an expected error.<br>
Added GL_TEXTURE_RECTANGLE in texture target array.<br>
<div class="im"><br>
ToDo: getMaxTarget, getProxyTarget and isValidTexSize functions can be added<br>
as piglit utility functions in piglit-util-gl.c<br>
I will do it in a separate patch.<br>
<br>
tests/all.tests | 1 +<br>
</div> tests/texturing/CMakeLists.gl.txt | 1 +<br>
tests/texturing/max-texture-size.c | 460 ++++++++++++++++++++++++++++++++++++<br>
3 files changed, 462 insertions(+), 0 deletions(-)<br>
create mode 100644 tests/texturing/max-texture-size.c<br>
<br>
diff --git a/tests/all.tests b/tests/all.tests<br>
index e4d56b8..ca15f5d 100644<br>
--- a/tests/all.tests<br>
+++ b/tests/all.tests<br>
@@ -679,6 +679,7 @@ add_plain_test(texturing, 'lodbias')<br>
add_plain_test(texturing, 'lodclamp')<br>
add_plain_test(texturing, 'lodclamp-between')<br>
add_plain_test(texturing, 'lodclamp-between-max')<br>
+add_plain_test(texturing, 'max-texture-size')<br>
add_plain_test(texturing, 'mipmap-setup')<br>
add_plain_test(texturing, 'rg-draw-pixels')<br>
add_plain_test(texturing, 'rg-teximage-01')<br>
diff --git a/tests/texturing/CMakeLists.gl.txt b/tests/texturing/CMakeLists.gl.txt<br>
index 6e12cc0..df44239 100644<br>
--- a/tests/texturing/CMakeLists.gl.txt<br>
+++ b/tests/texturing/CMakeLists.gl.txt<br>
@@ -38,6 +38,7 @@ add_executable (lodbias lodbias.c)<br>
add_executable (lodclamp lodclamp.c)<br>
add_executable (lodclamp-between lodclamp-between.c)<br>
add_executable (lodclamp-between-max lodclamp-between-max.c)<br>
+add_executable (max-texture-size max-texture-size.c)<br>
add_executable (mipmap-setup mipmap-setup.c)<br>
add_executable (rg-draw-pixels rg-draw-pixels.c)<br>
add_executable (rg-teximage-01 rg-teximage-01.c rg-teximage-common.c)<br>
diff --git a/tests/texturing/max-texture-size.c b/tests/texturing/max-texture-size.c<br>
new file mode 100644<br>
index 0000000..17ab06c<br>
--- /dev/null<br>
+++ b/tests/texturing/max-texture-size.c<br>
@@ -0,0 +1,460 @@<br>
<div class="im">+/* Copyright © 2012 Intel Corporation<br>
+ *<br>
+ * Permission is hereby granted, free of charge, to any person obtaining a<br>
+ * copy of this software and associated documentation files (the "Software"),<br>
+ * to deal in the Software without restriction, including without limitation<br>
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+ * and/or sell copies of the Software, and to permit persons to whom the<br>
+ * Software is furnished to do so, subject to the following conditions:<br>
+ *<br>
+ * The above copyright notice and this permission notice (including the next<br>
+ * paragraph) shall be included in all copies or substantial portions of the<br>
+ * Software.<br>
+ *<br>
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<br>
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS<br>
+ * IN THE SOFTWARE.<br>
+ */<br>
+<br>
+/**<br>
</div>+ * \file max-texture-size.c<br>
+ * Verify that large textures are handled properly in mesa driver.<br>
+ *<br>
<div class="im">+ * This test works by calling glTexImage1D/2D/3D and glTexSubImage1D/2D/3D<br>
+ * functions with different texture targets. Each texture target is tested<br>
</div>+ * with maximum supported texture size.<br>
+ * All the calls to glTexImage2D() and glTexSubImage2D() should ensure no<br>
+ * segmentation fault / assertion failure in mesa driver.<br>
<div class="im">+ *<br>
+ * This test case reproduces the errors reported in:<br>
+ * 1. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=44970" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=44970</a><br>
+ * Use GL_TEXTURE_2D and GL_RGBA16<br>
+ *<br>
+ * 2. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=46303" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=46303</a><br>
+ *<br>
</div>+ * GL_OUT_OF_MEMORY is an expected GL error in this tesyt case.<br>
<div class="im">+ *<br>
+ * \Author Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
+ */<br>
+<br>
+#include "piglit-util.h"<br>
+#define COLOR_COMPONENTS 4 /*GL_RGBA*/<br>
+<br>
+int piglit_width = 100, piglit_height = 100;<br>
+int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE;<br>
+<br>
+GLenum target[] = {<br>
+ GL_TEXTURE_1D,<br>
+ GL_TEXTURE_2D,<br>
</div>+ GL_TEXTURE_RECTANGLE,<br>
<div class="im">+ GL_TEXTURE_CUBE_MAP,<br>
+ GL_TEXTURE_3D,<br>
+ };<br>
+<br>
+GLenum internalformat[] = {<br>
+ GL_RGBA8,<br>
+ GL_RGBA16,<br>
+ GL_RGBA32F,<br>
+ };<br>
+<br>
</div>+static GLenum<br>
+getMaxTarget(GLenum target)<br>
<div class="im">+{<br>
+ switch(target) {<br>
+ case GL_TEXTURE_1D:<br>
+ case GL_TEXTURE_2D:<br>
+ return GL_MAX_TEXTURE_SIZE;<br>
+ case GL_TEXTURE_3D:<br>
+ return GL_MAX_3D_TEXTURE_SIZE;<br>
+ case GL_TEXTURE_CUBE_MAP_ARB:<br>
+ return GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB;<br>
+ case GL_TEXTURE_RECTANGLE:<br>
+ return GL_MAX_RECTANGLE_TEXTURE_SIZE;<br>
+ case GL_RENDERBUFFER_EXT:<br>
+ return GL_MAX_RENDERBUFFER_SIZE_EXT;<br>
+ default:<br>
+ printf ("Invalid texture target\n");<br>
+ return 0;<br>
+ }<br>
+}<br>
+<br>
</div>+static GLenum<br>
+getProxyTarget(GLenum target)<br>
<div class="im">+{<br>
+ switch(target) {<br>
+ case GL_TEXTURE_1D:<br>
+ return GL_PROXY_TEXTURE_1D;<br>
+ case GL_TEXTURE_2D:<br>
+ return GL_PROXY_TEXTURE_2D;<br>
+ case GL_TEXTURE_3D:<br>
+ return GL_PROXY_TEXTURE_3D;<br>
+ case GL_TEXTURE_CUBE_MAP:<br>
+ return GL_PROXY_TEXTURE_CUBE_MAP;<br>
+ case GL_TEXTURE_RECTANGLE:<br>
+ return GL_PROXY_TEXTURE_RECTANGLE;<br>
+ default:<br>
+ printf ("No proxy target for this texture target\n");<br>
+ return 0;<br>
+ }<br>
+}<br>
+<br>
</div>+static bool<br>
+isValidTexSize(GLenum target, GLenum internalFormat, int sideLength)<br>
<div><div class="h5">+{<br>
+ GLint texWidth;<br>
+ GLenum proxyTarget = getProxyTarget(target);<br>
+<br>
+ switch(proxyTarget) {<br>
+ case GL_PROXY_TEXTURE_1D:<br>
+ glTexImage1D(proxyTarget, 0, internalFormat, sideLength, 0,<br>
+ GL_RGBA, GL_FLOAT, 0);<br>
+ break;<br>
+ case GL_PROXY_TEXTURE_2D:<br>
+ case GL_PROXY_TEXTURE_RECTANGLE:<br>
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:<br>
+ glTexImage2D(proxyTarget, 0, internalFormat, sideLength,<br>
+ sideLength, 0, GL_RGBA, GL_FLOAT, 0);<br>
+ break;<br>
+ case GL_PROXY_TEXTURE_3D:<br>
+ glTexImage3D(proxyTarget, 0, internalFormat, sideLength,<br>
+ sideLength, sideLength, 0, GL_RGBA, GL_FLOAT, 0);<br>
+ break;<br>
+ default:<br>
+ printf ("Invalid proxy texture target");<br>
+ }<br>
+<br>
+ glGetTexLevelParameteriv(proxyTarget, 0, GL_TEXTURE_WIDTH, &texWidth);<br>
+ return texWidth == sideLength;<br>
+}<br>
+<br>
</div></div>+static GLfloat *<br>
+initTexData (GLenum target, int sideLength)<br>
<div class="im">+{<br>
+ uint64_t nPixels;<br>
+ if (target == GL_TEXTURE_1D)<br>
</div>+ nPixels = (uint64_t)(sideLength);<br>
<div class="im">+ else if (target == GL_TEXTURE_2D ||<br>
</div>+ target == GL_TEXTURE_RECTANGLE ||<br>
+ target == GL_TEXTURE_CUBE_MAP)<br>
+ nPixels = (uint64_t)(sideLength) *<br>
+ (uint64_t)(sideLength);<br>
<div class="im">+ else if (target == GL_TEXTURE_3D)<br>
</div>+ nPixels = (uint64_t)(sideLength) *<br>
+ (uint64_t)(sideLength) *<br>
+ (uint64_t)(sideLength);<br>
<div class="im">+<br>
+ /* Allocate sufficiently large data array and initialize to zero */<br>
+ return ((GLfloat *) calloc(nPixels * COLOR_COMPONENTS, sizeof(float)));<br>
+}<br>
+<br>
</div>+static GLboolean<br>
+ValidateTexSize (GLenum target, GLenum internalformat, bool useProxy)<br>
+{<br>
+ int maxSide, k;<br>
<div class="im">+ GLfloat *pixels = NULL;<br>
</div>+ GLenum err = GL_NO_ERROR;<br>
<div class="im">+<br>
+ /* Query the largest supported texture size */<br>
+ glGetIntegerv(getMaxTarget(target), &maxSide);<br>
+<br>
</div>+ if (!useProxy) {<br>
<div class="im">+ printf("%s, Internal Format = %s, Largest Texture Size ="<br>
+ " %d\n", piglit_get_gl_enum_name(target),<br>
+ piglit_get_gl_enum_name(internalformat),<br>
+ maxSide);<br>
+ /* Allocate and initialize texture data array */<br>
+ pixels = initTexData(target, maxSide);<br>
+<br>
+ if ( pixels == NULL) {<br>
+ printf("Error allocating texture data array\n");<br>
+ piglit_report_result(PIGLIT_SKIP);<br>
+ }<br>
</div><div class="im">+ }<br>
+ else {<br>
+ /* Compute largest supported texture size using proxy textures */<br>
+ while(isValidTexSize(target, internalformat, maxSide))<br>
+ maxSide *= 2;<br>
+ /* First unsupported size */<br>
+ while(!isValidTexSize(target, internalformat, maxSide))<br>
+ maxSide /= 2;<br>
+ while(isValidTexSize(target, internalformat, maxSide))<br>
+ maxSide += 1;<br>
+ /* Last supported texture size */<br>
+ maxSide -= 1;<br>
+ printf("%s, Internal Format = %s, Largest Texture Size ="<br>
+ " %d\n", piglit_get_gl_enum_name(getProxyTarget(target)),<br>
+ piglit_get_gl_enum_name(internalformat),<br>
+ maxSide);<br>
+ }<br>
+<br>
</div><div class="im">+ switch (target) {<br>
+ case GL_TEXTURE_1D:<br>
</div>+ //printf("Width = %d, Height = 1, Depth = 1\n", maxSide);<br>
+ if (!useProxy) {<br>
+ glTexImage1D(target, 0, internalformat, maxSide,<br>
<div class="im">+ 0, GL_RGBA, GL_FLOAT, NULL);<br>
+<br>
</div>+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ free(pixels);<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
+<br>
+ glTexSubImage1D(target, 0, 0, maxSide/2, GL_RGBA,<br>
+ GL_FLOAT, pixels);<br>
+<br>
+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ free(pixels);<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
+ }<br>
+ else {<br>
+ glTexImage1D(GL_PROXY_TEXTURE_1D, 0, internalformat,<br>
+ maxSide, 0, GL_RGBA, GL_FLOAT, NULL);<br>
+<br>
+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
<div class="im">+ }<br>
+ break;<br>
+<br>
+ case GL_TEXTURE_2D:<br>
</div>+ //printf("Width = %d, Height = %d, Depth = 1\n", maxSide,<br>
+ // maxSide);<br>
+ if(!useProxy) {<br>
+ glTexImage2D(target, 0, internalformat, maxSide,<br>
+ maxSide, 0, GL_RGBA, GL_FLOAT, NULL);<br>
+<br>
+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ free(pixels);<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
+<br>
+ glTexSubImage2D(target, 0, 0, 0, maxSide/2, maxSide/2,<br>
<div class="im">+ GL_RGBA, GL_FLOAT, pixels);<br>
+<br>
</div>+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ free(pixels);<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
<div class="im">+ }<br>
+ }<br>
+<br>
+ else {<br>
</div>+ glTexImage2D(GL_PROXY_TEXTURE_2D, 0, internalformat,<br>
+ maxSide, maxSide, 0, GL_RGBA, GL_FLOAT,<br>
+ NULL);<br>
+<br>
+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
+ }<br>
+ break;<br>
+<br>
+ case GL_TEXTURE_RECTANGLE:<br>
+ glTexImage2D(target, 0, internalformat, maxSide,<br>
+ maxSide, 0, GL_RGBA, GL_FLOAT, NULL);<br>
+<br>
+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
<div class="im">+ }<br>
+ break;<br>
+<br>
+ case GL_TEXTURE_3D:<br>
</div>+ //printf("Width = %d, Height = %d, Depth = %d\n", maxSide,<br>
+ // maxSide, maxSide);<br>
+ if(!useProxy) {<br>
+ glTexImage3D(target, 0, internalformat, maxSide,<br>
+ maxSide, maxSide, 0, GL_RGBA, GL_FLOAT,<br>
+ NULL);<br>
+<br>
+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ free(pixels);<br>
+ return false;<br>
+ }<br>
+<br>
+ glTexSubImage3D(target, 0, 0, 0, 0, maxSide/2,<br>
+ maxSide/2, maxSide/2, GL_RGBA,<br>
+ GL_FLOAT, pixels);<br>
+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ free(pixels);<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
+ }<br>
+ else {<br>
+ glTexImage3D(GL_PROXY_TEXTURE_3D, 0, internalformat,<br>
+ maxSide, maxSide, maxSide, 0, GL_RGBA,<br>
+ GL_FLOAT, NULL);<br>
+<br>
+ err = glGetError();<br>
+ if (err == GL_OUT_OF_MEMORY)<br>
+ return true;<br>
+<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
<div class="im">+ }<br>
+ break;<br>
+<br>
+ case GL_TEXTURE_CUBE_MAP_ARB:<br>
</div>+ //printf("Width = %d, Height = %d, Depth = 1\n", maxSide,<br>
+ // maxSide);<br>
+ if (!useProxy) {<br>
<div class="im">+ for (k = 0; k < 6; k++) {<br>
+ glTexImage2D(<br>
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X + k,<br>
</div>+ 0, internalformat, maxSide, maxSide, 0,<br>
<div class="im">+ GL_RGBA, GL_FLOAT, NULL);<br>
+<br>
</div>+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ free(pixels);<br>
+ return false;<br>
+ }<br>
<div class="im">+ }<br>
+<br>
+ for (k = 0; k < 6; k++) {<br>
+ glTexSubImage2D(<br>
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X + k,<br>
</div>+ 0, 0, 0, maxSide/2, maxSide/2, GL_RGBA,<br>
+ GL_FLOAT, pixels);<br>
+<br>
+ err = glGetError();<br>
+ if (err == GL_OUT_OF_MEMORY) {<br>
+ free(pixels);<br>
+ return true;<br>
+ }<br>
+<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ free(pixels);<br>
+ return false;<br>
<div class="im">+ }<br>
+ }<br>
+ }<br>
+ else {<br>
</div>+ glTexImage2D(GL_PROXY_TEXTURE_CUBE_MAP, 0,<br>
+ internalformat, maxSide, maxSide, 0,<br>
<div class="im">+ GL_RGBA, GL_FLOAT, NULL);<br>
+<br>
</div>+ err = glGetError();<br>
+ /* Report a GL error other than GL_OUT_OF_MEMORY */<br>
+ if (err != GL_NO_ERROR && err != GL_OUT_OF_MEMORY) {<br>
+ printf("Unexpected GL error: 0x%x\n", err);<br>
+ return false;<br>
+ }<br>
+ }<br>
+ break;<br>
+ }<br>
+ if (pixels)<br>
+ free(pixels);<br>
+ /* If execution reaches this point, return true */<br>
+ return true;<br>
+}<br>
+<br>
+void<br>
+piglit_init(int argc, char **argv)<br>
+{<br>
+ GLuint tex;<br>
+ GLboolean pass = true;<br>
<div class="im">+ int i, j;<br>
+<br>
+ glMatrixMode(GL_PROJECTION);<br>
+ glPushMatrix();<br>
+ glLoadIdentity();<br>
+ glOrtho(0, piglit_width, 0, piglit_height, -1, 1);<br>
+ glMatrixMode(GL_MODELVIEW);<br>
+ glPushMatrix();<br>
+ glLoadIdentity();<br>
+ glClearColor(0.2, 0.2, 0.2, 1.0);<br>
+ glClear(GL_COLOR_BUFFER_BIT);<br>
+<br>
+ for ( i = 0; i < ARRAY_SIZE(target); i++) {<br>
+<br>
+ glGenTextures(1, &tex);<br>
+ glBindTexture(target[i], tex);<br>
+ glTexParameteri(target[i], GL_TEXTURE_MIN_FILTER, GL_NEAREST);<br>
+ glTexParameteri(target[i], GL_TEXTURE_MAG_FILTER, GL_NEAREST);<br>
+<br>
+ for (j = 0; j < ARRAY_SIZE(internalformat); j++) {<br>
</div>+ /* Skip floating point formats if GL_ARB_texture_float<br>
+ * is not supported<br>
+ */<br>
+ if ((internalformat[j] == GL_RGBA16F ||<br>
+ internalformat[j] == GL_RGBA32F) &&<br>
+ !piglit_is_extension_supported(<br>
+ "GL_ARB_texture_float"))<br>
+ continue;<br>
<div class="im">+ /* Test using proxy textures */<br>
</div>+ pass = ValidateTexSize (target[i], internalformat[j], true)<br>
+ && pass;<br>
<div class="im">+ }<br>
+ glDeleteTextures(1, &tex);<br>
+ }<br>
+<br>
+ printf("\n");<br>
</div><div class="im">+<br>
+ for ( i = 0; i < ARRAY_SIZE(target); i++) {<br>
+<br>
+ glGenTextures(1, &tex);<br>
+ glBindTexture(target[i], tex);<br>
+ glTexParameteri(target[i], GL_TEXTURE_MIN_FILTER, GL_NEAREST);<br>
+ glTexParameteri(target[i], GL_TEXTURE_MAG_FILTER, GL_NEAREST);<br>
+<br>
+ for (j = 0; j < ARRAY_SIZE(internalformat); j++) {<br>
+<br>
+ if (internalformat[j] == GL_RGBA16F ||<br>
+ internalformat[j] == GL_RGBA32F)<br>
</div><div class="im">+ piglit_require_extension("GL_ARB_texture_float");<br>
+<br>
+ /* Test with out proxy textures*/<br>
</div>+ pass = ValidateTexSize (target[i], internalformat[j], false)<br>
+ && pass;<br>
<div class="im">+ }<br>
+ }<br>
+<br>
+ printf("\n");<br>
+<br>
</div>+ piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);<br>
+}<br>
+<br>
+enum<br>
+piglit_result<br>
<div class="HOEnZb"><div class="h5">+piglit_display(void)<br>
+{<br>
+ return PIGLIT_FAIL;<br>
+}<br>
--<br>
1.7.7.6<br>
<br></div></div></blockquote><div>Brian, does this test still takes long time to finish on nvidia? I 'll push it if there are no pending issues.</div><div><br></div><div>Thanks</div><div>Anuj</div></div><br>