[Mesa-dev] [PATCH v2 1/3] loader: add loader_get_extensions_name(..) helper
Christian Gmeiner
christian.gmeiner at gmail.com
Wed Nov 9 14:50:05 UTC 2016
Changes since v1:
- renamed function to loader_get_extensions_name
- moved function into loader
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/loader/loader.c | 14 ++++++++++++++
src/loader/loader.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/src/loader/loader.c b/src/loader/loader.c
index fe90307..69c23cd 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -51,6 +51,9 @@
#endif
#endif
+#include <GL/gl.h>
+#include <GL/internal/dri_interface.h>
+
#define __IS_LOADER
#include "pci_id_driver_map.h"
@@ -396,3 +399,14 @@ loader_set_logger(void (*logger)(int level, const char *fmt, ...))
{
log_ = logger;
}
+
+char *
+loader_get_extensions_name(const char *driver_name)
+{
+ char *name = NULL;
+
+ if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driver_name) < 0)
+ return NULL;
+
+ return name;
+}
diff --git a/src/loader/loader.h b/src/loader/loader.h
index d404f5b..84314a4 100644
--- a/src/loader/loader.h
+++ b/src/loader/loader.h
@@ -65,6 +65,8 @@ loader_get_user_preferred_fd(int default_fd, int *different_device);
void
loader_set_logger(void (*logger)(int level, const char *fmt, ...));
+char *
+loader_get_extensions_name(const char *driver_name);
#ifdef __cplusplus
}
--
2.7.4
More information about the mesa-dev
mailing list