summaryrefslogtreecommitdiff
path: root/src/gallium/targets/xorg-nouveau
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/xorg-nouveau')
-rw-r--r--src/gallium/targets/xorg-nouveau/Makefile5
-rw-r--r--src/gallium/targets/xorg-nouveau/nouveau_target.c20
2 files changed, 24 insertions, 1 deletions
diff --git a/src/gallium/targets/xorg-nouveau/Makefile b/src/gallium/targets/xorg-nouveau/Makefile
index f50872362f..93f53e63bf 100644
--- a/src/gallium/targets/xorg-nouveau/Makefile
+++ b/src/gallium/targets/xorg-nouveau/Makefile
@@ -4,14 +4,17 @@ include $(TOP)/configs/current
LIBNAME = modesetting_drv.so
C_SOURCES = \
+ nouveau_target.c \
nouveau_xorg.c
DRIVER_DEFINES = \
- -DHAVE_CONFIG_H
+ -DHAVE_CONFIG_H -DGALLIUM_RBUG -DGALLIUM_TRACE
DRIVER_LINKS = \
$(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a \
$(TOP)/src/gallium/winsys/nouveau/drm/libnouveaudrm.a \
+ $(TOP)/src/gallium/drivers/trace/libtrace.a \
+ $(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/nvfx/libnvfx.a \
$(TOP)/src/gallium/drivers/nv50/libnv50.a \
$(TOP)/src/gallium/drivers/nouveau/libnouveau.a \
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..e725a4d9b7
--- /dev/null
+++ b/src/gallium/targets/xorg-nouveau/nouveau_target.c
@@ -0,0 +1,20 @@
+
+#include "target-helpers/inline_debug_helper.h"
+#include "state_tracker/drm_driver.h"
+#include "nouveau/drm/nouveau_drm_public.h"
+
+static struct pipe_screen *
+create_screen(int fd)
+{
+ struct pipe_screen *screen;
+
+ screen = nouveau_drm_screen_create(fd);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+}
+
+DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen)