[Piglit] [PATCH 2/3] framework: Handle supports_gl_compat_version >= 32 with GLUT.

Jose Fonseca jfonseca at vmware.com
Sat Mar 14 00:45:32 PDT 2015


We were wrongly using glutInitContextFlags instead of
glutInitContextProfile.  Again, I think that this only ever worked because
GLUT_CORE_PROFILE is also the default.
---
 tests/util/piglit-framework-gl/piglit_glut_framework.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/util/piglit-framework-gl/piglit_glut_framework.c b/tests/util/piglit-framework-gl/piglit_glut_framework.c
index b10ee1c..4651937 100644
--- a/tests/util/piglit-framework-gl/piglit_glut_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_glut_framework.c
@@ -137,10 +137,15 @@ init_glut(void)
 	if (test_config->supports_gl_core_version) {
 		glutInitContextVersion(test_config->supports_gl_core_version / 10,
 				       test_config->supports_gl_core_version % 10);
-		glutInitContextFlags(GLUT_CORE_PROFILE);
+		if (test_config->supports_gl_core_version >= 32) {
+			glutInitContextProfile(GLUT_CORE_PROFILE);
+		}
 	} else {
 		glutInitContextVersion(test_config->supports_gl_compat_version / 10,
 				       test_config->supports_gl_compat_version % 10);
+		if (test_config->supports_gl_compat_version >= 32) {
+			glutInitContextProfile(GLUT_COMPATIBILITY_PROFILE);
+		}
 	}
 #endif
 
-- 
2.1.0



More information about the Piglit mailing list