[Piglit] [PATCH 4/4] egl_khr_create_context: handle Compatibility contexts properly
Marek Olšák
maraeo at gmail.com
Sat Oct 21 12:55:05 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
tests/egl/spec/egl_khr_create_context/default-major-version-gl.c | 5 +++--
tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c | 5 +++--
tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c | 7 ++++---
tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c | 7 ++++---
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c b/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c
index 993ee4a..cd7acf9 100644
--- a/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c
+++ b/tests/egl/spec/egl_khr_create_context/default-major-version-gl.c
@@ -69,22 +69,23 @@ int main(int argc, char **argv)
if (!parse_version_string(version_string, &major, &minor)) {
fprintf(stderr,
"Unable to parse GL version string: %s\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
if ((major == 1 && (minor < 2 || minor > 5)) ||
(major == 2 && (minor < 0 || minor > 1)) ||
- (major == 3 && minor != 0) ||
- (major < 1 || major > 3)) {
+ (major == 3 && (minor < 0 || minor > 3)) ||
+ (major == 4 && (minor < 0 || minor > 6)) ||
+ (major < 1 || major > 4)) {
fprintf(stderr,
"Unexpected GL version: %s\n"
"Expected GL 1.2-1.5, 2.0, 2.1, or 3.0.\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(egl_dpy, ctx);
diff --git a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
index a6a56ec..d263537 100644
--- a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
+++ b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
@@ -70,22 +70,23 @@ int main(int argc, char **argv)
version_string = (char *) glGetString(GL_VERSION);
if (!parse_version_string(version_string, &major, &minor)) {
fprintf(stderr,
"Unable to parse GL version string: %s\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
if ((major == 2 && (minor < 0 || minor > 1)) ||
- (major == 3 && (minor != 0)) ||
- (major < 2 || major > 3)) {
+ (major == 3 && (minor < 0 || minor > 3)) ||
+ (major == 4 && (minor < 0 || minor > 6)) ||
+ (major < 2 || major > 4)) {
fprintf(stderr,
"Unexpected GL version: %s\n"
"Expected GL 2.0, 2.1, or 3.0.\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(egl_dpy, ctx);
diff --git a/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c b/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c
index 71a12a8..40613ba 100644
--- a/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c
+++ b/tests/egl/spec/egl_khr_create_context/valid-attribute-empty-gl.c
@@ -59,24 +59,25 @@ int main(int argc, char **argv)
version_string = (char *) glGetString(GL_VERSION);
if (!parse_version_string(version_string, &major, &minor)) {
fprintf(stderr,
"Unable to parse GL version string: %s\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
- if ((major < 1 || major > 3) ||
- (major == 1 && (minor < 2 || minor > 5)) ||
+ if ((major == 1 && (minor < 2 || minor > 5)) ||
(major == 2 && (minor < 0 || minor > 1)) ||
- (major == 3 && minor != 0)) {
+ (major == 3 && (minor < 0 || minor > 3)) ||
+ (major == 4 && (minor < 0 || minor > 6)) ||
+ (major < 1 || major > 4)) {
fprintf(stderr,
"Unexpected Desktop GL version: %s\n"
"Expected GL 1.2-1.5, 2.0, 2.1, or 3.0.\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(egl_dpy, ctx);
diff --git a/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c b/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c
index e3870ec..f251b1d 100644
--- a/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c
+++ b/tests/egl/spec/egl_khr_create_context/valid-attribute-null-gl.c
@@ -56,24 +56,25 @@ int main(int argc, char **argv)
version_string = (char *) glGetString(GL_VERSION);
if (!parse_version_string(version_string, &major, &minor)) {
fprintf(stderr,
"Unable to parse GL version string: %s\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
- if ((major < 1 || major > 3) ||
- (major == 1 && (minor < 2 || minor > 5)) ||
+ if ((major == 1 && (minor < 2 || minor > 5)) ||
(major == 2 && (minor < 0 || minor > 1)) ||
- (major == 3 && minor != 0)) {
+ (major == 3 && (minor < 0 || minor > 3)) ||
+ (major == 4 && (minor < 0 || minor > 6)) ||
+ (major < 1 || major > 4)) {
fprintf(stderr,
"Unexpected Desktop GL version: %s\n"
"Expected GL 1.2-1.5, 2.0, 2.1, or 3.0.\n",
version_string);
piglit_report_result(PIGLIT_FAIL);
}
eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(egl_dpy, ctx);
--
2.7.4
More information about the Piglit
mailing list