[Piglit] [PATCH 11/12] arb_internalformat_query2: print more details when filter test fails
Alejandro PiƱeiro
apinheiro at igalia.com
Fri May 13 15:26:12 UTC 2016
Acked-by: Eduardo Lima <elima at igalia.com>
Acked-by: Antia Puentes <apuentes at 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(-)
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;
}
--
2.7.4
More information about the Piglit
mailing list