[Piglit] [PATCH 7/8] piglit-util-gl-common: Add Function to clear extensions list.
Kenney Phillis
kphillisjr at gmail.com
Mon Sep 30 20:11:07 PDT 2013
The default handling of Extension fall backs does not work in specific
cases where the list of supported extensions changes. The list of
extensions for a Core profile may be different from the same
context created using a Compatibility profile.
V2: applied the changes suggested by Chad to improve this function.
In my previous submission of this I forgot to make note of this.
This commit changed the new function to:
piglit_gl_reinitialize_extensions
---
tests/util/piglit-util-gl-common.c | 8 ++++++++
tests/util/piglit-util-gl-common.h | 5 +++++
2 files changed, 13 insertions(+)
diff --git a/tests/util/piglit-util-gl-common.c b/tests/util/piglit-util-gl-common.c
index f4b7f29..02a9bee 100644
--- a/tests/util/piglit-util-gl-common.c
+++ b/tests/util/piglit-util-gl-common.c
@@ -133,6 +133,14 @@ static void initialize_piglit_extension_support(void)
#endif
}
+void piglit_gl_reinitialize_extensions()
+{
+ if (gl_extensions != NULL) {
+ free(gl_extensions);
+ gl_extensions = NULL;
+ }
+}
+
bool piglit_is_extension_supported(const char *name)
{
initialize_piglit_extension_support();
diff --git a/tests/util/piglit-util-gl-common.h b/tests/util/piglit-util-gl-common.h
index e7d0797..c4bca65 100644
--- a/tests/util/piglit-util-gl-common.h
+++ b/tests/util/piglit-util-gl-common.h
@@ -64,6 +64,11 @@ int piglit_get_gl_version(void);
bool piglit_is_extension_supported(const char *name);
/**
+ * reinitialize the supported extension List.
+ */
+void piglit_gl_reinitialize_extensions();
+
+/**
* \brief Convert a GL error to a string.
*
* For example, given GL_INVALID_ENUM, return "GL_INVALID_ENUM".
--
1.7.9.5
More information about the Piglit
mailing list