targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 16 Jun 2014 22:44:22 +0000 (23:44 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 10 Jul 2014 00:06:47 +0000 (01:06 +0100)
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@gmail.com>
Tested-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
Acked-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/auxiliary/target-helpers/inline_drm_helper.h
src/gallium/targets/dri/Makefile.am

index 62c4f8e29a1babee96eb44978848e2a332d72a38..131798c57da66ae62aa0e7d1636aa95722af7773 100644 (file)
@@ -106,6 +106,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)
 {
@@ -117,6 +129,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)
 {
@@ -128,6 +152,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)
 {
index f9d348284521c30ec038f684bfcde701ea103647..4f4c0da95ffe3c2c2cf0c6a92d844ba4bdbb8683 100644 (file)
@@ -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