[Piglit] [PATCH 1/4] piglit-util-gl-common: Add Function to clear extensions list.

Kenney Phillis kphillisjr at gmail.com
Tue Aug 20 13:12:12 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.
---
 tests/util/piglit-util-gl-common.c |    8 ++++++++
 tests/util/piglit-util-gl-common.h |    6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/tests/util/piglit-util-gl-common.c b/tests/util/piglit-util-gl-common.c
index 7d21d18..336f0b0 100644
--- a/tests/util/piglit-util-gl-common.c
+++ b/tests/util/piglit-util-gl-common.c
@@ -132,6 +132,14 @@ static void initialize_piglit_extension_support(void)
 #endif
 }
 
+void piglit_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 41f110a..ed18a4c 100644
--- a/tests/util/piglit-util-gl-common.h
+++ b/tests/util/piglit-util-gl-common.h
@@ -64,6 +64,12 @@ int piglit_get_gl_version(void);
 bool piglit_is_extension_supported(const char *name);
 
 /**
+ * reinitialize the supported extension List.
+ */
+
+void piglit_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