aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-01-14 09:12:35 -0800
committerEric Anholt <eric@anholt.net>2013-01-21 12:45:40 -0800
commit125decb61727c71dbc2d553151f93b8077fa6f4f (patch)
tree0cc9a16736b22284a8203ce1026d8e462a339bda
parentb85f89db9a837a731d09fe34e4fc3f6441deda97 (diff)
fbo-generate-mipmap-formats: Report subtest results.
v2: Leave printfs in place. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--tests/fbo/fbo-generatemipmap-formats.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/fbo/fbo-generatemipmap-formats.c b/tests/fbo/fbo-generatemipmap-formats.c
index aa4bd14f..449a955e 100644
--- a/tests/fbo/fbo-generatemipmap-formats.c
+++ b/tests/fbo/fbo-generatemipmap-formats.c
@@ -34,6 +34,7 @@
#include "piglit-util-gl-common.h"
#include "fbo-formats.h"
+static bool npot;
static int tex_width = 256;
static int tex_height = 256;
@@ -47,8 +48,9 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
PIGLIT_GL_TEST_CONFIG_END
-static void set_npot(GLboolean npot)
+static void set_npot(bool new_npot)
{
+ npot = new_npot;
if (npot) {
tex_width = 293;
tex_height = 277;
@@ -63,7 +65,8 @@ key_func(unsigned char key, int x, int y)
{
switch (key) {
case 'd':
- set_npot(tex_width == 256 && piglit_is_extension_supported("GL_ARB_texture_non_power_of_two"));
+ if (piglit_is_extension_supported("GL_ARB_texture_non_power_of_two"))
+ set_npot(!npot);
break;
}
fbo_formats_key_func(key, x, y);
@@ -444,6 +447,10 @@ test_format(const struct format_desc *format, GLenum basetype)
glDeleteTextures(1, &tex);
+ piglit_report_subtest_result(pass ? PIGLIT_PASS : PIGLIT_FAIL,
+ "%s%s", format->name,
+ npot ? " NPOT" : "");
+
return pass;
}