[Mesa-dev] [PATCH 12/23] targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols

Emil Velikov emil.l.velikov at gmail.com
Tue Jun 17 11:38:28 PDT 2014


The symbol is introduced by the mesa megadrivers, and
adding gallium support for it will allow us to merge
st/dri/drm and st/dri/sw. Resulting in a single dri library
across all of gallium.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 .../auxiliary/target-helpers/inline_drm_helper.h   | 36 ++++++++++++++++++++++
 src/gallium/targets/dri/Makefile.am                |  5 +++
 2 files changed, 41 insertions(+)

diff --git a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
index f179202..69949e8 100644
--- a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
@@ -113,6 +113,18 @@ pipe_nouveau_create_screen(int fd)
 #endif
 
 #if defined(GALLIUM_R300)
+#if defined(DRI_TARGET)
+#include "dri_screen.h"
+
+const __DRIextension **__driDriverGetExtensions_r300(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_r300(void)
+{
+   globalDriverAPI = &galliumdrm_driver_api;
+   return galliumdrm_driver_extensions;
+}
+#endif
+
 static struct pipe_screen *
 pipe_r300_create_screen(int fd)
 {
@@ -124,6 +136,18 @@ pipe_r300_create_screen(int fd)
 #endif
 
 #if defined(GALLIUM_R600)
+#if defined(DRI_TARGET)
+#include "dri_screen.h"
+
+const __DRIextension **__driDriverGetExtensions_r600(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_r600(void)
+{
+   globalDriverAPI = &galliumdrm_driver_api;
+   return galliumdrm_driver_extensions;
+}
+#endif
+
 static struct pipe_screen *
 pipe_r600_create_screen(int fd)
 {
@@ -135,6 +159,18 @@ pipe_r600_create_screen(int fd)
 #endif
 
 #if defined(GALLIUM_RADEONSI)
+#if defined(DRI_TARGET)
+#include "dri_screen.h"
+
+const __DRIextension **__driDriverGetExtensions_radeonsi(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_radeonsi(void)
+{
+   globalDriverAPI = &galliumdrm_driver_api;
+   return galliumdrm_driver_extensions;
+}
+#endif
+
 static struct pipe_screen *
 pipe_radeonsi_create_screen(int fd)
 {
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index e7f028d..706a1bd 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -18,6 +18,11 @@ AM_CPPFLAGS += \
 	-DDRI_TARGET
 endif
 
+if NEED_RADEON_DRM_WINSYS
+AM_CPPFLAGS += \
+	-DDRI_TARGET
+endif
+
 dridir = $(DRI_DRIVER_INSTALL_DIR)
 dri_LTLIBRARIES = gallium_dri.la
 
-- 
2.0.0



More information about the mesa-dev mailing list