[Piglit] [PATCH 08/16] util/gl: Unify extension detetction between GL and GLES
Chad Versace
chad.versace at linux.intel.com
Wed Jul 9 14:56:50 PDT 2014
Now that piglit-dispatch supports every OpenGL API, there is no
longer a need to provide separate implementations for GL and GLES.
This patch is safe for GLES because glGetStringi() is available in
OpenGL ES 3.0.
This patch brings us one step closer to unifying Piglit's CMake files.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
tests/util/piglit-util-gl-common.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/tests/util/piglit-util-gl-common.c b/tests/util/piglit-util-gl-common.c
index 41fb245..7fa95ff 100644
--- a/tests/util/piglit-util-gl-common.c
+++ b/tests/util/piglit-util-gl-common.c
@@ -71,7 +71,6 @@ static const char** gl_extension_array_from_getstring()
return piglit_split_string_to_array(gl_extensions_string, " ");
}
-#if defined(PIGLIT_USE_OPENGL)
static const char** gl_extension_array_from_getstringi()
{
const char **strings;
@@ -89,7 +88,6 @@ static const char** gl_extension_array_from_getstringi()
return (const char**) strings;
}
-#endif
static void initialize_piglit_extension_support(void)
{
@@ -97,19 +95,11 @@ static void initialize_piglit_extension_support(void)
return;
}
-#if defined(PIGLIT_USE_OPENGL_ES1) || \
- defined(PIGLIT_USE_OPENGL_ES2) || \
- defined(PIGLIT_USE_OPENGL_ES3)
- gl_extensions = gl_extension_array_from_getstring();
-#elif defined(PIGLIT_USE_OPENGL)
if (piglit_get_gl_version() < 30) {
gl_extensions = gl_extension_array_from_getstring();
} else {
gl_extensions = gl_extension_array_from_getstringi();
}
-#else
-#error Need code implemented to read extensions
-#endif
}
void piglit_gl_reinitialize_extensions()
--
2.0.0
More information about the Piglit
mailing list