[Piglit] [PATCH 1/3] util/waffle: Print message when falling back to compatibility context

Chad Versace chad.versace at linux.intel.com
Wed Feb 20 15:03:17 PST 2013


Some tests declare in their config block that they support running under
both core and compatibility contexts. In this case, Piglit first attempts
to use a core context; if core context creation fails, then Piglit falls
back to the compatibility context.

This patch prints a diagnostic when the fallback occurs.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 tests/util/piglit-framework-gl/piglit_wfl_framework.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
index 6e59544..172c610 100644
--- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
@@ -357,6 +357,15 @@ make_context_current(struct piglit_wfl_framework *wfl_fw,
 		}
 	}
 
+	if (test_config->supports_gl_core_version &&
+	    test_config->supports_gl_compat_version) {
+		/* The above attempt to create a core context failed. */
+		printf("piglit: info: Falling back to GL %d.%d "
+		       "compatibility context\n",
+		       test_config->supports_gl_compat_version / 10,
+		       test_config->supports_gl_compat_version % 10);
+        }
+
 	if (test_config->supports_gl_compat_version) {
 		ok = make_context_current_singlepass(wfl_fw, test_config,
 		                                     CONTEXT_GL_COMPAT,
-- 
1.8.1.1



More information about the Piglit mailing list