summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/targets/dri-i915/Makefile1
-rw-r--r--src/gallium/targets/dri-i915/SConscript2
-rw-r--r--src/gallium/targets/dri-i915/dummy.c0
-rw-r--r--src/gallium/targets/dri-i915/target.c4
-rw-r--r--src/gallium/targets/dri-i965/Makefile1
-rw-r--r--src/gallium/targets/dri-i965/SConscript2
-rw-r--r--src/gallium/targets/dri-i965/dummy.c0
-rw-r--r--src/gallium/targets/dri-i965/target.c4
-rw-r--r--src/gallium/targets/dri-nouveau/Makefile1
-rw-r--r--src/gallium/targets/dri-nouveau/target.c4
-rw-r--r--src/gallium/targets/dri-r600/Makefile1
-rw-r--r--src/gallium/targets/dri-r600/SConscript2
-rw-r--r--src/gallium/targets/dri-r600/dummy.c0
-rw-r--r--src/gallium/targets/dri-r600/target.c4
-rw-r--r--src/gallium/targets/dri-radeong/Makefile1
-rw-r--r--src/gallium/targets/dri-radeong/SConscript2
-rw-r--r--src/gallium/targets/dri-radeong/dummy.c0
-rw-r--r--src/gallium/targets/dri-radeong/target.c4
-rw-r--r--src/gallium/targets/dri-vmwgfx/Makefile1
-rw-r--r--src/gallium/targets/dri-vmwgfx/SConscript2
-rw-r--r--src/gallium/targets/dri-vmwgfx/dummy.c0
-rw-r--r--src/gallium/targets/dri-vmwgfx/target.c4
-rw-r--r--src/gallium/targets/egl-i915/Makefile2
-rw-r--r--src/gallium/targets/egl-i915/target.c (renamed from src/gallium/targets/egl-i915/dummy.c)5
-rw-r--r--src/gallium/targets/egl-i965/Makefile2
-rw-r--r--src/gallium/targets/egl-i965/target.c (renamed from src/gallium/targets/egl-i965/dummy.c)5
-rw-r--r--src/gallium/targets/egl-nouveau/Makefile2
-rw-r--r--src/gallium/targets/egl-nouveau/target.c8
-rw-r--r--src/gallium/targets/egl-radeon/Makefile2
-rw-r--r--src/gallium/targets/egl-radeon/target.c (renamed from src/gallium/targets/egl-radeon/dummy.c)5
-rw-r--r--src/gallium/targets/egl-vmwgfx/Makefile2
-rw-r--r--src/gallium/targets/egl-vmwgfx/dummy.c3
-rw-r--r--src/gallium/targets/egl-vmwgfx/target.c (renamed from src/gallium/targets/egl-nouveau/dummy.c)4
-rw-r--r--src/gallium/targets/xorg-i915/Makefile1
-rw-r--r--src/gallium/targets/xorg-i915/intel_target.c4
-rw-r--r--src/gallium/targets/xorg-i965/Makefile1
-rw-r--r--src/gallium/targets/xorg-i965/intel_target.c4
-rw-r--r--src/gallium/targets/xorg-nouveau/Makefile1
-rw-r--r--src/gallium/targets/xorg-nouveau/nouveau_target.c4
-rw-r--r--src/gallium/targets/xorg-radeon/radeon_target.c4
-rw-r--r--src/gallium/targets/xorg-vmwgfx/Makefile1
-rw-r--r--src/gallium/targets/xorg-vmwgfx/vmw_target.c4
42 files changed, 91 insertions, 13 deletions
diff --git a/src/gallium/targets/dri-i915/Makefile b/src/gallium/targets/dri-i915/Makefile
index fdcfd08c22..24ef989ad2 100644
--- a/src/gallium/targets/dri-i915/Makefile
+++ b/src/gallium/targets/dri-i915/Makefile
@@ -13,6 +13,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/i915/libi915.a
C_SOURCES = \
+ target.c \
$(COMMON_GALLIUM_SOURCES) \
$(DRIVER_SOURCES)
diff --git a/src/gallium/targets/dri-i915/SConscript b/src/gallium/targets/dri-i915/SConscript
index 65c4239887..5da2a0a403 100644
--- a/src/gallium/targets/dri-i915/SConscript
+++ b/src/gallium/targets/dri-i915/SConscript
@@ -22,6 +22,6 @@ env.Prepend(LIBS = [
env.LoadableModule(
target = 'i915_dri.so',
- source = 'dummy.c',
+ source = 'target.c',
SHLIBPREFIX = '',
)
diff --git a/src/gallium/targets/dri-i915/dummy.c b/src/gallium/targets/dri-i915/dummy.c
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/gallium/targets/dri-i915/dummy.c
+++ /dev/null
diff --git a/src/gallium/targets/dri-i915/target.c b/src/gallium/targets/dri-i915/target.c
new file mode 100644
index 0000000000..8fd7308893
--- /dev/null
+++ b/src/gallium/targets/dri-i915/target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("i915", "i915")
diff --git a/src/gallium/targets/dri-i965/Makefile b/src/gallium/targets/dri-i965/Makefile
index 13987c643e..b068430ecf 100644
--- a/src/gallium/targets/dri-i965/Makefile
+++ b/src/gallium/targets/dri-i965/Makefile
@@ -15,6 +15,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/i965/libi965.a
C_SOURCES = \
+ target.c \
$(COMMON_GALLIUM_SOURCES) \
$(DRIVER_SOURCES)
diff --git a/src/gallium/targets/dri-i965/SConscript b/src/gallium/targets/dri-i965/SConscript
index 13ac5a2d8e..9e12c61aab 100644
--- a/src/gallium/targets/dri-i965/SConscript
+++ b/src/gallium/targets/dri-i965/SConscript
@@ -24,6 +24,6 @@ env.Prepend(LIBS = [
env.LoadableModule(
target = 'i965_dri.so',
- source = 'dummy.c',
+ source = 'target.c',
SHLIBPREFIX = '',
)
diff --git a/src/gallium/targets/dri-i965/dummy.c b/src/gallium/targets/dri-i965/dummy.c
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/gallium/targets/dri-i965/dummy.c
+++ /dev/null
diff --git a/src/gallium/targets/dri-i965/target.c b/src/gallium/targets/dri-i965/target.c
new file mode 100644
index 0000000000..9fe2227edd
--- /dev/null
+++ b/src/gallium/targets/dri-i965/target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("i965", "i915")
diff --git a/src/gallium/targets/dri-nouveau/Makefile b/src/gallium/targets/dri-nouveau/Makefile
index 74d352c6a7..bf594ce483 100644
--- a/src/gallium/targets/dri-nouveau/Makefile
+++ b/src/gallium/targets/dri-nouveau/Makefile
@@ -11,6 +11,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/nouveau/libnouveau.a
C_SOURCES = \
+ target.c \
$(COMMON_GALLIUM_SOURCES) \
$(DRIVER_SOURCES)
diff --git a/src/gallium/targets/dri-nouveau/target.c b/src/gallium/targets/dri-nouveau/target.c
new file mode 100644
index 0000000000..e16e86cd3d
--- /dev/null
+++ b/src/gallium/targets/dri-nouveau/target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("nouveau", "nouveau")
diff --git a/src/gallium/targets/dri-r600/Makefile b/src/gallium/targets/dri-r600/Makefile
index 0213200fbc..136fbb260b 100644
--- a/src/gallium/targets/dri-r600/Makefile
+++ b/src/gallium/targets/dri-r600/Makefile
@@ -12,6 +12,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/r600/libr600.a
C_SOURCES = \
+ target.c \
$(COMMON_GALLIUM_SOURCES) \
$(DRIVER_SOURCES)
diff --git a/src/gallium/targets/dri-r600/SConscript b/src/gallium/targets/dri-r600/SConscript
index 6c23c050eb..d24251673c 100644
--- a/src/gallium/targets/dri-r600/SConscript
+++ b/src/gallium/targets/dri-r600/SConscript
@@ -22,6 +22,6 @@ env.Prepend(LIBS = [
env.SharedLibrary(
target ='r600_dri.so',
- source = 'dummy.c',
+ source = 'target.c',
SHLIBPREFIX = '',
)
diff --git a/src/gallium/targets/dri-r600/dummy.c b/src/gallium/targets/dri-r600/dummy.c
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/gallium/targets/dri-r600/dummy.c
+++ /dev/null
diff --git a/src/gallium/targets/dri-r600/target.c b/src/gallium/targets/dri-r600/target.c
new file mode 100644
index 0000000000..3f09a7c5a9
--- /dev/null
+++ b/src/gallium/targets/dri-r600/target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("r600", "radeon")
diff --git a/src/gallium/targets/dri-radeong/Makefile b/src/gallium/targets/dri-radeong/Makefile
index 8ef24c0821..d67d7d7ac2 100644
--- a/src/gallium/targets/dri-radeong/Makefile
+++ b/src/gallium/targets/dri-radeong/Makefile
@@ -12,6 +12,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/r300/libr300.a
C_SOURCES = \
+ target.c \
$(COMMON_GALLIUM_SOURCES) \
$(DRIVER_SOURCES)
diff --git a/src/gallium/targets/dri-radeong/SConscript b/src/gallium/targets/dri-radeong/SConscript
index 4c6cfb84eb..c1d4eeecee 100644
--- a/src/gallium/targets/dri-radeong/SConscript
+++ b/src/gallium/targets/dri-radeong/SConscript
@@ -22,6 +22,6 @@ env.Prepend(LIBS = [
env.SharedLibrary(
target ='radeon_dri.so',
- source = 'dummy.c',
+ source = 'target.c',
SHLIBPREFIX = '',
)
diff --git a/src/gallium/targets/dri-radeong/dummy.c b/src/gallium/targets/dri-radeong/dummy.c
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/gallium/targets/dri-radeong/dummy.c
+++ /dev/null
diff --git a/src/gallium/targets/dri-radeong/target.c b/src/gallium/targets/dri-radeong/target.c
new file mode 100644
index 0000000000..06b64820cf
--- /dev/null
+++ b/src/gallium/targets/dri-radeong/target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("radeon", "radeon")
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile b/src/gallium/targets/dri-vmwgfx/Makefile
index b5b679f3c7..8e3cd6ff28 100644
--- a/src/gallium/targets/dri-vmwgfx/Makefile
+++ b/src/gallium/targets/dri-vmwgfx/Makefile
@@ -11,6 +11,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/svga/libsvga.a
C_SOURCES = \
+ target.c \
$(COMMON_GALLIUM_SOURCES)
include ../Makefile.dri
diff --git a/src/gallium/targets/dri-vmwgfx/SConscript b/src/gallium/targets/dri-vmwgfx/SConscript
index 09a0c254c3..3d0c5495da 100644
--- a/src/gallium/targets/dri-vmwgfx/SConscript
+++ b/src/gallium/targets/dri-vmwgfx/SConscript
@@ -20,6 +20,6 @@ env.Prepend(LIBS = [
env.LoadableModule(
target = 'vmwgfx_dri.so',
- source = 'dummy.c',
+ source = 'target.c',
SHLIBPREFIX = '',
)
diff --git a/src/gallium/targets/dri-vmwgfx/dummy.c b/src/gallium/targets/dri-vmwgfx/dummy.c
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/gallium/targets/dri-vmwgfx/dummy.c
+++ /dev/null
diff --git a/src/gallium/targets/dri-vmwgfx/target.c b/src/gallium/targets/dri-vmwgfx/target.c
new file mode 100644
index 0000000000..3d1990fc1b
--- /dev/null
+++ b/src/gallium/targets/dri-vmwgfx/target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("vmwgfx", "vmwgfx")
diff --git a/src/gallium/targets/egl-i915/Makefile b/src/gallium/targets/egl-i915/Makefile
index a4b41842ff..a118f16929 100644
--- a/src/gallium/targets/egl-i915/Makefile
+++ b/src/gallium/targets/egl-i915/Makefile
@@ -2,7 +2,7 @@ TOP = ../../../..
include $(TOP)/configs/current
EGL_DRIVER_NAME = i915
-EGL_DRIVER_SOURCES = dummy.c
+EGL_DRIVER_SOURCES = target.c
EGL_DRIVER_LIBS = -ldrm_intel
EGL_DRIVER_PIPES = \
diff --git a/src/gallium/targets/egl-i915/dummy.c b/src/gallium/targets/egl-i915/target.c
index 3181d0ba7e..fd68c4bd45 100644
--- a/src/gallium/targets/egl-i915/dummy.c
+++ b/src/gallium/targets/egl-i915/target.c
@@ -1,3 +1,8 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("i915", "i915")
+
/* A poor man's --whole-archive for EGL drivers */
void *_eglMain(void *);
void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/targets/egl-i965/Makefile b/src/gallium/targets/egl-i965/Makefile
index d4730824a5..542200481d 100644
--- a/src/gallium/targets/egl-i965/Makefile
+++ b/src/gallium/targets/egl-i965/Makefile
@@ -2,7 +2,7 @@ TOP = ../../../..
include $(TOP)/configs/current
EGL_DRIVER_NAME = i965
-EGL_DRIVER_SOURCES = dummy.c
+EGL_DRIVER_SOURCES = target.c
EGL_DRIVER_LIBS = -ldrm_intel
EGL_DRIVER_PIPES = \
diff --git a/src/gallium/targets/egl-i965/dummy.c b/src/gallium/targets/egl-i965/target.c
index 3181d0ba7e..2f97bcecf2 100644
--- a/src/gallium/targets/egl-i965/dummy.c
+++ b/src/gallium/targets/egl-i965/target.c
@@ -1,3 +1,8 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("i965", "i915")
+
/* A poor man's --whole-archive for EGL drivers */
void *_eglMain(void *);
void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/targets/egl-nouveau/Makefile b/src/gallium/targets/egl-nouveau/Makefile
index e3fa8937e8..3f0a373e43 100644
--- a/src/gallium/targets/egl-nouveau/Makefile
+++ b/src/gallium/targets/egl-nouveau/Makefile
@@ -2,7 +2,7 @@ TOP = ../../../..
include $(TOP)/configs/current
EGL_DRIVER_NAME = nouveau
-EGL_DRIVER_SOURCES = dummy.c
+EGL_DRIVER_SOURCES = target.c
EGL_DRIVER_LIBS = -ldrm_nouveau
EGL_DRIVER_PIPES = \
diff --git a/src/gallium/targets/egl-nouveau/target.c b/src/gallium/targets/egl-nouveau/target.c
new file mode 100644
index 0000000000..49545c63e1
--- /dev/null
+++ b/src/gallium/targets/egl-nouveau/target.c
@@ -0,0 +1,8 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("nouveau", "nouveau")
+
+/* A poor man's --whole-archive for EGL drivers */
+void *_eglMain(void *);
+void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/targets/egl-radeon/Makefile b/src/gallium/targets/egl-radeon/Makefile
index 8fcca26826..c988b48cd0 100644
--- a/src/gallium/targets/egl-radeon/Makefile
+++ b/src/gallium/targets/egl-radeon/Makefile
@@ -2,7 +2,7 @@ TOP = ../../../..
include $(TOP)/configs/current
EGL_DRIVER_NAME = radeon
-EGL_DRIVER_SOURCES = dummy.c
+EGL_DRIVER_SOURCES = target.c
EGL_DRIVER_LIBS = -ldrm_radeon
EGL_DRIVER_PIPES = \
diff --git a/src/gallium/targets/egl-radeon/dummy.c b/src/gallium/targets/egl-radeon/target.c
index 3181d0ba7e..03b982ae83 100644
--- a/src/gallium/targets/egl-radeon/dummy.c
+++ b/src/gallium/targets/egl-radeon/target.c
@@ -1,3 +1,8 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("radeon", "radeon")
+
/* A poor man's --whole-archive for EGL drivers */
void *_eglMain(void *);
void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/targets/egl-vmwgfx/Makefile b/src/gallium/targets/egl-vmwgfx/Makefile
index a9f6874b98..a25bf8885d 100644
--- a/src/gallium/targets/egl-vmwgfx/Makefile
+++ b/src/gallium/targets/egl-vmwgfx/Makefile
@@ -2,7 +2,7 @@ TOP = ../../../..
include $(TOP)/configs/current
EGL_DRIVER_NAME = vmwgfx
-EGL_DRIVER_SOURCES = dummy.c
+EGL_DRIVER_SOURCES = target.c
EGL_DRIVER_LIBS =
EGL_DRIVER_PIPES = \
diff --git a/src/gallium/targets/egl-vmwgfx/dummy.c b/src/gallium/targets/egl-vmwgfx/dummy.c
deleted file mode 100644
index 3181d0ba7e..0000000000
--- a/src/gallium/targets/egl-vmwgfx/dummy.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* A poor man's --whole-archive for EGL drivers */
-void *_eglMain(void *);
-void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/targets/egl-nouveau/dummy.c b/src/gallium/targets/egl-vmwgfx/target.c
index 3181d0ba7e..39a829a230 100644
--- a/src/gallium/targets/egl-nouveau/dummy.c
+++ b/src/gallium/targets/egl-vmwgfx/target.c
@@ -1,3 +1,7 @@
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("vmwgfx", "vmwgfx")
+
/* A poor man's --whole-archive for EGL drivers */
void *_eglMain(void *);
void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/targets/xorg-i915/Makefile b/src/gallium/targets/xorg-i915/Makefile
index 18f07d6d8f..4f9202b052 100644
--- a/src/gallium/targets/xorg-i915/Makefile
+++ b/src/gallium/targets/xorg-i915/Makefile
@@ -4,6 +4,7 @@ include $(TOP)/configs/current
LIBNAME = modesetting_drv.so
C_SOURCES = \
+ intel_target.c \
intel_xorg.c
DRIVER_DEFINES = \
diff --git a/src/gallium/targets/xorg-i915/intel_target.c b/src/gallium/targets/xorg-i915/intel_target.c
new file mode 100644
index 0000000000..4eff93c074
--- /dev/null
+++ b/src/gallium/targets/xorg-i915/intel_target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("modesetting", "i915")
diff --git a/src/gallium/targets/xorg-i965/Makefile b/src/gallium/targets/xorg-i965/Makefile
index 2b0c7d6fdf..b23a2deab9 100644
--- a/src/gallium/targets/xorg-i965/Makefile
+++ b/src/gallium/targets/xorg-i965/Makefile
@@ -4,6 +4,7 @@ include $(TOP)/configs/current
LIBNAME = i965g_drv.so
C_SOURCES = \
+ intel_target.c \
intel_xorg.c
DRIVER_DEFINES = \
diff --git a/src/gallium/targets/xorg-i965/intel_target.c b/src/gallium/targets/xorg-i965/intel_target.c
new file mode 100644
index 0000000000..2b0f545877
--- /dev/null
+++ b/src/gallium/targets/xorg-i965/intel_target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("i965g", "i915")
diff --git a/src/gallium/targets/xorg-nouveau/Makefile b/src/gallium/targets/xorg-nouveau/Makefile
index f50872362f..066ec6a813 100644
--- a/src/gallium/targets/xorg-nouveau/Makefile
+++ b/src/gallium/targets/xorg-nouveau/Makefile
@@ -4,6 +4,7 @@ include $(TOP)/configs/current
LIBNAME = modesetting_drv.so
C_SOURCES = \
+ nouveau_target.c \
nouveau_xorg.c
DRIVER_DEFINES = \
diff --git a/src/gallium/targets/xorg-nouveau/nouveau_target.c b/src/gallium/targets/xorg-nouveau/nouveau_target.c
new file mode 100644
index 0000000000..e16e86cd3d
--- /dev/null
+++ b/src/gallium/targets/xorg-nouveau/nouveau_target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("nouveau", "nouveau")
diff --git a/src/gallium/targets/xorg-radeon/radeon_target.c b/src/gallium/targets/xorg-radeon/radeon_target.c
new file mode 100644
index 0000000000..06b64820cf
--- /dev/null
+++ b/src/gallium/targets/xorg-radeon/radeon_target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("radeon", "radeon")
diff --git a/src/gallium/targets/xorg-vmwgfx/Makefile b/src/gallium/targets/xorg-vmwgfx/Makefile
index c0ff999116..0cc9be212b 100644
--- a/src/gallium/targets/xorg-vmwgfx/Makefile
+++ b/src/gallium/targets/xorg-vmwgfx/Makefile
@@ -8,6 +8,7 @@ C_SOURCES = \
vmw_video.c \
vmw_ioctl.c \
vmw_ctrl.c \
+ vmw_target.c \
vmw_screen.c
DRIVER_INCLUDES = \
diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_target.c b/src/gallium/targets/xorg-vmwgfx/vmw_target.c
new file mode 100644
index 0000000000..3d1990fc1b
--- /dev/null
+++ b/src/gallium/targets/xorg-vmwgfx/vmw_target.c
@@ -0,0 +1,4 @@
+
+#include "target-helpers/drm_api_compat.h"
+
+DRM_API_COMPAT_STRUCT("vmwgfx", "vmwgfx")