[11/12] arb_internalformat_query2: print more details when filter test fails

Submitted by apinheiro on May 13, 2016, 3:26 p.m.

Details

Message ID 1463153173-12219-12-git-send-email-apinheiro@igalia.com
State New
Headers show
Series "ARB_internalformat_query2 support for OpenGL ES and other fixes" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

apinheiro May 13, 2016, 3:26 p.m.
Acked-by: Eduardo Lima <elima@igalia.com>
Acked-by: Antia Puentes <apuentes@igalia.com>
---
 tests/spec/arb_internalformat_query2/common.c |  4 ++--
 tests/spec/arb_internalformat_query2/common.h |  4 ++++
 tests/spec/arb_internalformat_query2/filter.c | 15 +++++++++++++--
 3 files changed, 19 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index 0bb159e..1e0efd6 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -644,7 +644,7 @@  cleanup:
  * It is assumed that @pname is a valid query2 pname, as would
  * simplify the implementation of this method.
  */
-static bool
+bool
 check_query2_pname_dependencies(const GLenum pname)
 {
         switch(pname) {
@@ -767,7 +767,7 @@  is_gles31()
  * It is assumed that @target is a valid query2 target, as would
  * simplify the implementation of this method.
  */
-static bool
+bool
 check_query2_target_dependencies(const GLenum target)
 {
         switch(target) {
diff --git a/tests/spec/arb_internalformat_query2/common.h b/tests/spec/arb_internalformat_query2/common.h
index 935b9aa..fa5ad64 100644
--- a/tests/spec/arb_internalformat_query2/common.h
+++ b/tests/spec/arb_internalformat_query2/common.h
@@ -381,6 +381,10 @@  bool value_on_set(const GLint *set,
 bool check_query2_dependencies(const GLenum pname,
                                const GLenum target);
 
+bool check_query2_target_dependencies(const GLenum target);
+
+bool check_query2_pname_dependencies(const GLenum pname);
+
 bool test_data_is_unsupported_response(test_data *data,
                                        GLenum pname);
 
diff --git a/tests/spec/arb_internalformat_query2/filter.c b/tests/spec/arb_internalformat_query2/filter.c
index 1f815ea..2c7d04a 100644
--- a/tests/spec/arb_internalformat_query2/filter.c
+++ b/tests/spec/arb_internalformat_query2/filter.c
@@ -127,9 +127,20 @@  is_multi_texel_filtering_supported(GLenum target,
  * getting a opengl error
  */
 static void
-print_failing_details(GLenum target,
+print_failing_details(GLenum pname,
+                      GLenum target,
                       GLenum internalformat)
 {
+        if (!check_query2_target_dependencies(target)) {
+                fprintf(stderr, "\tDependencies not fulfilled for target %s\n",
+                        piglit_get_gl_enum_name(target));
+        }
+
+        if (!check_query2_pname_dependencies(pname)) {
+                fprintf(stderr, "\tDependencies not fulfilled for pname %s\n",
+                        piglit_get_gl_enum_name(pname));
+        }
+
         if (target == GL_TEXTURE_BUFFER || is_multisample_target(target))
                 fprintf(stderr, "\tTarget %s doesn't support multi-texel filtering\n",
                         piglit_get_gl_enum_name(target));
@@ -193,7 +204,7 @@  try_local(const GLenum *targets, unsigned num_targets,
                                            pname, data);
 
                         if (!value_test)
-                                print_failing_details(targets[i], internalformats[j]);
+                                print_failing_details(pname, targets[i], internalformats[j]);
 
                         pass = false;
                 }