Mesa (master): targets/dri: Add __driDriverGetExtensions_i915 symbol

Emil Velikov evelikov at kemper.freedesktop.org
Thu Jul 10 00:07:30 UTC 2014


Module: Mesa
Branch: master
Commit: 3591acacf9579033aeaf3ccade59ad02288236e9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3591acacf9579033aeaf3ccade59ad02288236e9

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Mon Jun 16 23:51:12 2014 +0100

targets/dri: Add __driDriverGetExtensions_i915 symbol

Identical to previous commits - will bring us a step closer
to megadrivers.

Cc: Stephane Marchesin <stephane.marchesin at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Tested-by: Rob Clark <robclark at freedesktop.org>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
Acked-by: Tom Stellard <thomas.stellard at amd.com>

---

 src/gallium/auxiliary/target-helpers/inline_drm_helper.h |   12 ++++++++++++
 src/gallium/targets/dri/Makefile.am                      |    5 +++++
 2 files changed, 17 insertions(+)

diff --git a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
index 6c9f15a..48753a6 100644
--- a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
@@ -51,6 +51,18 @@ static char* driver_name = NULL;
 /* XXX: We need to teardown the winsys if *screen_create() fails. */
 
 #if defined(GALLIUM_I915)
+#if defined(DRI_TARGET)
+#include "dri_screen.h"
+
+const __DRIextension **__driDriverGetExtensions_i915(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_i915(void)
+{
+   globalDriverAPI = &galliumdrm_driver_api;
+   return galliumdrm_driver_extensions;
+}
+#endif
+
 static struct pipe_screen *
 pipe_i915_create_screen(int fd)
 {
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index d5cbae5..a098833 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -13,6 +13,11 @@ AM_CPPFLAGS = \
 	-DGALLIUM_RBUG \
 	-DGALLIUM_TRACE
 
+if HAVE_GALLIUM_I915
+AM_CPPFLAGS += \
+	-DDRI_TARGET
+endif
+
 if HAVE_GALLIUM_NOUVEAU
 AM_CPPFLAGS += \
 	-DDRI_TARGET




More information about the mesa-commit mailing list