summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/target-helpers/inline_drm_helper.h36
-rw-r--r--src/gallium/targets/dri/Makefile.am5
2 files changed, 41 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
index 62c4f8e29a1..131798c57da 100644
--- a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
@@ -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)
{
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index f9d34828452..4f4c0da95ff 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