diff options
author | Christian König <deathsimple@vodafone.de> | 2012-07-13 11:23:10 +0200 |
---|---|---|
committer | Christian König <deathsimple@vodafone.de> | 2012-08-02 15:15:23 +0200 |
commit | 41625afa2f7f30e5076c695ab3a16eabb5fe69f8 (patch) | |
tree | 9de6502725bc565b4d52af99c0dd58a3ea5eabee | |
parent | a3c6607be19af895ed6857c0a82b9b0821893dc6 (diff) |
radeonsi: initial VDPAU target
Windowed speed is of course way to slow, but fullscreen
works like a charm now.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/gallium/targets/vdpau-radeonsi/Makefile | 30 | ||||
-rw-r--r-- | src/gallium/targets/vdpau-radeonsi/target.c | 24 |
3 files changed, 55 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index f7fbf99a4c1..b6481a69fd7 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -2009,7 +2009,7 @@ if test "x$with_gallium_drivers" != x; then | |||
2009 | AC_MSG_ERROR([LLVM 3.1 is required to build the radeonsi driver.]) | 2009 | AC_MSG_ERROR([LLVM 3.1 is required to build the radeonsi driver.]) |
2010 | fi | 2010 | fi |
2011 | NEED_RADEON_GALLIUM=yes; | 2011 | NEED_RADEON_GALLIUM=yes; |
2012 | gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" | 2012 | gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" "" |
2013 | ;; | 2013 | ;; |
2014 | xnouveau) | 2014 | xnouveau) |
2015 | PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED]) | 2015 | PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED]) |
diff --git a/src/gallium/targets/vdpau-radeonsi/Makefile b/src/gallium/targets/vdpau-radeonsi/Makefile new file mode 100644 index 00000000000..6dd2be9fc0f --- /dev/null +++ b/src/gallium/targets/vdpau-radeonsi/Makefile | |||
@@ -0,0 +1,30 @@ | |||
1 | TOP = ../../../.. | ||
2 | include $(TOP)/configs/current | ||
3 | |||
4 | LIBBASENAME = vdpau_radeonsi | ||
5 | |||
6 | DRIVER_INCLUDES = $(shell $(PKG_CONFIG) libdrm --cflags-only-I) | ||
7 | |||
8 | PIPE_DRIVERS = \ | ||
9 | $(TOP)/src/gallium/drivers/radeonsi/libradeonsi.a \ | ||
10 | $(TOP)/src/gallium/state_trackers/dri/drm/libdridrm.a \ | ||
11 | $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \ | ||
12 | $(TOP)/src/gallium/drivers/trace/libtrace.a \ | ||
13 | $(TOP)/src/gallium/drivers/rbug/librbug.a \ | ||
14 | $(TOP)/src/gallium/drivers/noop/libnoop.a \ | ||
15 | $(TOP)/src/gallium/auxiliary/libgallium.a | ||
16 | |||
17 | C_SOURCES = \ | ||
18 | target.c \ | ||
19 | $(TOP)/src/gallium/auxiliary/vl/vl_winsys_dri.c \ | ||
20 | $(COMMON_GALLIUM_SOURCES) \ | ||
21 | $(DRIVER_SOURCES) | ||
22 | |||
23 | DRIVER_DEFINES = \ | ||
24 | -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_NOOP | ||
25 | |||
26 | DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon | ||
27 | |||
28 | include ../Makefile.vdpau | ||
29 | |||
30 | symlinks: | ||
diff --git a/src/gallium/targets/vdpau-radeonsi/target.c b/src/gallium/targets/vdpau-radeonsi/target.c new file mode 100644 index 00000000000..ffb66623b2b --- /dev/null +++ b/src/gallium/targets/vdpau-radeonsi/target.c | |||
@@ -0,0 +1,24 @@ | |||
1 | #include "state_tracker/drm_driver.h" | ||
2 | #include "target-helpers/inline_debug_helper.h" | ||
3 | #include "radeon/drm/radeon_drm_public.h" | ||
4 | #include "radeonsi/radeonsi_public.h" | ||
5 | |||
6 | static struct pipe_screen *create_screen(int fd) | ||
7 | { | ||
8 | struct radeon_winsys *radeon; | ||
9 | struct pipe_screen *screen; | ||
10 | |||
11 | radeon = radeon_drm_winsys_create(fd); | ||
12 | if (!radeon) | ||
13 | return NULL; | ||
14 | |||
15 | screen = radeonsi_screen_create(radeon); | ||
16 | if (!screen) | ||
17 | return NULL; | ||
18 | |||
19 | screen = debug_screen_wrap(screen); | ||
20 | |||
21 | return screen; | ||
22 | } | ||
23 | |||
24 | DRM_DRIVER_DESCRIPTOR("radeonsi", "radeon", create_screen, NULL) | ||