[Piglit] [PATCH] util/framework/glut: check if we have a core profile
Brian Paul
brianp at vmware.com
Wed Jun 25 08:45:34 PDT 2014
For the GLUT framework, check the context version and whether
GL_ARB_compatibility is supported to determine if we should set
piglit_is_core_profile. Fixes some issues when running GL 3.1 and
later on Windows.
---
tests/util/piglit-framework-gl/piglit_glut_framework.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/util/piglit-framework-gl/piglit_glut_framework.c b/tests/util/piglit-framework-gl/piglit_glut_framework.c
index 7c872fb..7530d8d 100644
--- a/tests/util/piglit-framework-gl/piglit_glut_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_glut_framework.c
@@ -256,6 +256,14 @@ piglit_glut_framework_create(const struct piglit_gl_test_config *test_config)
if (!check_gl_version(test_config))
piglit_report_result(PIGLIT_SKIP);
+ /* Check if we actually have a core profile */
+ {
+ int actual_version = piglit_get_gl_version();
+ if (actual_version >= 31 &&
+ !piglit_is_extension_supported("GL_ARB_compatibility"))
+ piglit_is_core_profile = true;
+ }
+
glut_fw.gl_fw.swap_buffers = swap_buffers;
glut_fw.gl_fw.run_test = run_test;
glut_fw.gl_fw.post_redisplay = post_redisplay;
--
1.7.10.4
More information about the Piglit
mailing list