[Piglit] [PATCH v2] gl30basic: add some extra suspected extension This fixes spec/gl30basic test on Windows Intel and Nvidia driver.
Sandra Koroniewska
sandra.koroniewska at gmail.com
Thu Jun 8 15:56:15 UTC 2017
---
tests/general/gl30basic.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tests/general/gl30basic.c b/tests/general/gl30basic.c
index 08305a6f8..fbcb59ce9 100644
--- a/tests/general/gl30basic.c
+++ b/tests/general/gl30basic.c
@@ -95,13 +95,16 @@ test_extension_list(void)
const GLubyte *ext = glGetStringi(GL_EXTENSIONS, k);
if (0)
printf("Ext[%d] = %s\n", k, (char *) ext);
- if (!ext ||
- ext[0] != 'G' ||
- ext[1] != 'L' ||
- ext[2] != '_') {
- if (ext[0] != 'W' ||
- ext[1] != 'G' ||
- ext[2] != 'L') {
+ if (!ext || strncmp(ext, "GL_", 3))
+ {
+ /* Note: normally, glGetStringi(GL_EXTENSIONS, i) should only return
+ * "core" OpenGL extension strings and not window system (WGL/GLX)
+ * extensions. However, NVIDIA's and Intel's Windows drivers include
+ * WGL_EXT_swap_control in the core extensions list. This is a special
+ * case for that.
+ */
+ if (strncmp(ext, "WGL_EXT_swap_control", 20))
+ {
printf("%s: bad extension string [%d]: %s\n", Prog, k, ext);
return PIGLIT_FAIL;
}
--
2.11.0.windows.1
More information about the Piglit
mailing list