<div dir="ltr">On 5 January 2013 01:07, Chris Forbes <span dir="ltr"><<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Verifies new minimum maximums in ARB_texture_multisample:<br>
<br>
GL_MAX_COLOR_TEXTURE_SAMPLES >= 1<br>
GL_MAX_DEPTH_TEXTURE_SAMPLES >= 1<br>
GL_MAX_INTEGER_SAMPLES >= 1<br>
GL_MAX_SAMPLE_MASK_WORDS >= 1<br>
<br>
Signed-off-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz">chrisf@ijw.co.nz</a>><br>
---<br>
 tests/all.tests                                    |  5 ++++<br>
 .../spec/arb_texture_multisample/CMakeLists.gl.txt |  1 +<br>
 tests/spec/arb_texture_multisample/minmax.c        | 32 ++++++++++++++++++++++<br>
 3 files changed, 38 insertions(+)<br>
 create mode 100644 tests/spec/arb_texture_multisample/minmax.c<br>
<br>
diff --git a/tests/all.tests b/tests/all.tests<br>
index 7053989..acaf1ad 100644<br>
--- a/tests/all.tests<br>
+++ b/tests/all.tests<br>
@@ -840,6 +840,11 @@ arb_point_sprite = Group()<br>
 spec['ARB_point_sprite'] = arb_point_sprite<br>
 add_plain_test(arb_point_sprite, 'point-sprite')<br>
<br>
+# Group ARB_texture_multisample<br>
+arb_texture_multisample = Group()<br>
+spec['ARB_texture_multisample'] = arb_texture_multisample<br>
+add_concurrent_test(arb_texture_multisample, 'arb_texture_multisample-minmax')<br>
+<br>
 # Group AMD_shader_stencil_export<br>
 spec['AMD_shader_stencil_export'] = Group()<br>
 import_glsl_parser_tests(spec['AMD_shader_stencil_export'],<br>
diff --git a/tests/spec/arb_texture_multisample/CMakeLists.gl.txt b/tests/spec/arb_texture_multisample/CMakeLists.gl.txt<br>
index c37afac..90dae9e 100644<br>
--- a/tests/spec/arb_texture_multisample/CMakeLists.gl.txt<br>
+++ b/tests/spec/arb_texture_multisample/CMakeLists.gl.txt<br>
@@ -10,5 +10,6 @@ link_libraries (<br>
        ${OPENGL_glu_LIBRARY}<br>
 )<br>
<br>
+piglit_add_executable (arb_texture_multisample-minmax minmax.c)<br>
<br>
 # vim: ft=cmake:<br>
diff --git a/tests/spec/arb_texture_multisample/minmax.c b/tests/spec/arb_texture_multisample/minmax.c<br>
new file mode 100644<br>
index 0000000..1bfcbcb<br>
--- /dev/null<br>
+++ b/tests/spec/arb_texture_multisample/minmax.c<br>
@@ -0,0 +1,32 @@<br>
+#include "piglit-util-gl-common.h"<br>
+#include "minmax-test.h"<br>
+<br>
+PIGLIT_GL_TEST_CONFIG_BEGIN<br>
+<br>
+    config.supports_gl_compat_version = 10;<br>
+    config.supports_gl_core_version = 31;<br>
+    config.window_width = 32;<br>
+    config.window_height = 32;<br></blockquote><div><br></div><div>Window height/width less than 116 pixels cause problems when Piglit is run on windows (because Windows forcibly resizes the window, causing the Piglit framework to report the test result as "WARN" instead of "PASS").  Since you're not actually drawing anything in the window for this test, I would just eliminate these two lines, so that the window width and height are left at the default size.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+    config.window_visual = PIGLIT_GL_VISUAL_RGB;<br>
+<br>
+PIGLIT_GL_TEST_CONFIG_END<br>
+<br>
+void<br>
+piglit_init(int argc, char **argv)<br>
+{<br>
+    piglit_require_extension("GL_ARB_texture_multisample");<br>
+    piglit_print_minmax_header();<br>
+<br>
+    piglit_test_min_int(GL_MAX_SAMPLE_MASK_WORDS, 1);<br>
+    piglit_test_min_int(GL_MAX_COLOR_TEXTURE_SAMPLES, 1);<br>
+    piglit_test_min_int(GL_MAX_DEPTH_TEXTURE_SAMPLES, 1);<br>
+    piglit_test_min_int(GL_MAX_INTEGER_SAMPLES, 1);<br>
+<br>
+    piglit_report_result(PIGLIT_PASS);<br></blockquote><div><br></div><div>This line needs to be "piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL)".  Otherwise, the test will pass even if one of the minmax checks fails.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+}<br>
+<br>
+enum piglit_result<br>
+piglit_display(void)<br>
+{<br>
+    return PIGLIT_FAIL;<br>
+}<br>
<span class=""><font color="#888888">--<br>
1.8.1<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div></div>