<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 15, 2015 at 6:50 AM, Tapani Pälli <span dir="ltr"><<a href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Test passes on Nvidia binary driver (version 346.35).<br>
<br>
Signed-off-by: Tapani Pälli <<a href="mailto:tapani.palli@intel.com">tapani.palli@intel.com</a>><br>
---<br>
tests/all.py | 5 ++<br>
tests/spec/CMakeLists.txt | 1 +<br>
.../CMakeLists.gl.txt | 12 +++<br>
.../arb_framebuffer_no_attachments/CMakeLists.txt | 1 +<br>
tests/spec/arb_framebuffer_no_attachments/minmax.c | 96 ++++++++++++++++++++++<br>
5 files changed, 115 insertions(+)<br>
create mode 100755 tests/spec/arb_framebuffer_no_attachments/CMakeLists.gl.txt<br>
create mode 100644 tests/spec/arb_framebuffer_no_attachments/CMakeLists.txt<br>
create mode 100644 tests/spec/arb_framebuffer_no_attachments/minmax.c<br>
<br>
diff --git a/tests/all.py b/tests/all.py<br>
index d3afdbe..18124b7 100755<br>
--- a/tests/all.py<br>
+++ b/tests/all.py<br>
@@ -2291,6 +2291,11 @@ with profile.group_manager(<br>
g(['arb_program_interface_query-getprogramresourcename'], run_concurrent=False)<br>
g(['arb_program_interface_query-getprogramresourceiv'], run_concurrent=False)<br>
<br>
+with profile.group_manager(<br>
+ PiglitGLTest,<br>
+ grouptools.join('spec', 'ARB_framebuffer_no_attachments')) as g:<br>
+ g(['arb_framebuffer_no_attachments-minmax'], run_concurrent=False)<br>
+<br>
# Group ARB_explicit_uniform_location<br>
with profile.group_manager(<br>
PiglitGLTest,<br>
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt<br>
index 6ccf73d..330b38c 100644<br>
--- a/tests/spec/CMakeLists.txt<br>
+++ b/tests/spec/CMakeLists.txt<br>
@@ -18,6 +18,7 @@ add_subdirectory (arb_es2_compatibility)<br>
add_subdirectory (arb_es3_compatibility)<br>
add_subdirectory (arb_explicit_attrib_location)<br>
add_subdirectory (arb_explicit_uniform_location)<br>
+add_subdirectory (arb_framebuffer_no_attachments)<br>
add_subdirectory (arb_framebuffer_object)<br>
add_subdirectory (arb_framebuffer_srgb)<br>
add_subdirectory (arb_geometry_shader4)<br>
diff --git a/tests/spec/arb_framebuffer_no_attachments/CMakeLists.gl.txt b/tests/spec/arb_framebuffer_no_attachments/CMakeLists.gl.txt<br>
new file mode 100755<br>
index 0000000..894b95e<br>
--- /dev/null<br>
+++ b/tests/spec/arb_framebuffer_no_attachments/CMakeLists.gl.txt<br>
@@ -0,0 +1,12 @@<br>
+include_directories(<br>
+ ${GLEXT_INCLUDE_DIR}<br>
+ ${OPENGL_INCLUDE_PATH}<br>
+)<br>
+<br>
+link_libraries (<br>
+ piglitutil_${piglit_target_api}<br>
+ ${OPENGL_gl_LIBRARY}<br>
+ ${OPENGL_glu_LIBRARY}<br>
+)<br>
+<br>
+piglit_add_executable (arb_framebuffer_no_attachments-minmax minmax.c)<br>
diff --git a/tests/spec/arb_framebuffer_no_attachments/CMakeLists.txt b/tests/spec/arb_framebuffer_no_attachments/CMakeLists.txt<br>
new file mode 100644<br>
index 0000000..4a012b9<br>
--- /dev/null<br>
+++ b/tests/spec/arb_framebuffer_no_attachments/CMakeLists.txt<br>
@@ -0,0 +1 @@<br>
+piglit_include_target_api()<br>
\ No newline at end of file<br>
diff --git a/tests/spec/arb_framebuffer_no_attachments/minmax.c b/tests/spec/arb_framebuffer_no_attachments/minmax.c<br>
new file mode 100644<br>
index 0000000..a75e4c4<br>
--- /dev/null<br>
+++ b/tests/spec/arb_framebuffer_no_attachments/minmax.c<br>
@@ -0,0 +1,96 @@<br>
+/*<br>
+ * Copyright (c) 2015 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<br>
+ * DEALINGS IN THE SOFTWARE.<br>
+ */<br>
+<br>
+/** \file minmax.c<br>
+ *<br>
+ * Test for the minimum and maximum values specified in the<br>
+ * ARB_framebuffer_no_attachments extension. This test is written against<br>
+ * OpenGL 2.0, for OpenGL < 4.2 spec states:<br>
+ *<br>
+ * "For implementations supporting this extension on older versions, the<br>
+ * minimums can be determined from the table below.<br>
+ *<br>
+ * the minimum for is the minimum defined for<br>
+ * ----------------------- --------------------------<br>
+ * MAX_FRAMEBUFFER_WIDTH MAX_TEXTURE_SIZE<br>
+ * MAX_FRAMEBUFFER_HEIGHT MAX_TEXTURE_SIZE<br>
+ * MAX_FRAMEBUFFER_LAYERS MAX_ARRAY_TEXTURE_LAYERS<br>
+ * MAX_FRAMEBUFFER_SAMPLES MAX_SAMPLES<br>
+ * "<br>
+ */<br>
+<br>
+#include "piglit-util-gl.h"<br>
+#include "minmax-test.h"<br>
+<br>
+PIGLIT_GL_TEST_CONFIG_BEGIN<br>
+<br>
+ config.supports_gl_compat_version = 20;<br>
+<br>
+PIGLIT_GL_TEST_CONFIG_END<br>
+<br>
+enum piglit_result<br>
+piglit_display(void)<br>
+{<br>
+ /* UNREACHED */<br>
+ return PIGLIT_FAIL;<br>
+}<br>
+<br>
+static void<br>
+test_min_int(GLenum value, GLenum min_value)<br>
+{<br>
+ GLint min;<br>
+ glGetIntegerv(min_value, &min);<br></blockquote><div>Extra white space before glGetIntegerv.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ piglit_test_min_int(value, min);<br>
+}<br>
+<br>
+static void<br>
+texture_array_subtest()<br>
+{<br>
+ bool result;<br>
+ if (!piglit_is_extension_supported("GL_EXT_texture_array"))<br>
+ piglit_report_subtest_result(PIGLIT_SKIP, "layers");<br>
+<br>
+ test_min_int(GL_MAX_FRAMEBUFFER_LAYERS, GL_MAX_ARRAY_TEXTURE_LAYERS);<br>
+<br>
+ result = piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL;<br>
+<br>
+ piglit_report_subtest_result(result, "layers");<br>
+}<br>
+<br>
+void<br>
+piglit_init(int argc, char **argv)<br>
+{<br>
+ piglit_require_extension("GL_ARB_framebuffer_no_attachments");<br></blockquote><div> OpenGL 3.0 or ARB_framebuffer_object is required.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ piglit_print_minmax_header();<br>
+<br>
+ test_min_int(GL_MAX_FRAMEBUFFER_WIDTH, GL_MAX_TEXTURE_SIZE);<br>
+ test_min_int(GL_MAX_FRAMEBUFFER_HEIGHT, GL_MAX_TEXTURE_SIZE);<br>
+ test_min_int(GL_MAX_FRAMEBUFFER_SAMPLES, GL_MAX_SAMPLES);<br>
+<br>
+ texture_array_subtest();<br>
+<br>
+ if (!piglit_check_gl_error(GL_NO_ERROR))<br>
+ piglit_report_result(PIGLIT_FAIL);<br>
+<br>
+ piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);<br>
+}<br>
<span class=""><font color="#888888">--<br>
2.1.0<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 class="gmail_extra">With above comments fixed:</div><div class="gmail_extra">Reviewed-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>></div></div>