diff options
Diffstat (limited to 'src/gallium/targets/xorg-radeon')
-rw-r--r-- | src/gallium/targets/xorg-radeon/Makefile | 3 | ||||
-rw-r--r-- | src/gallium/targets/xorg-radeon/radeon_target.c | 26 |
2 files changed, 28 insertions, 1 deletions
diff --git a/src/gallium/targets/xorg-radeon/Makefile b/src/gallium/targets/xorg-radeon/Makefile index 6cbc61e7ae..caf2ac98b9 100644 --- a/src/gallium/targets/xorg-radeon/Makefile +++ b/src/gallium/targets/xorg-radeon/Makefile @@ -4,10 +4,11 @@ include $(TOP)/configs/current LIBNAME = radeon_drv.so C_SOURCES = \ + radeon_target.c \ radeon_xorg.c DRIVER_DEFINES = \ - -DHAVE_CONFIG_H + -DHAVE_CONFIG_H -DGALLIUM_RBUG -DGALLIUM_TRACE DRIVER_LINKS = \ $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a \ 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..5a0a8dc573 --- /dev/null +++ b/src/gallium/targets/xorg-radeon/radeon_target.c @@ -0,0 +1,26 @@ + +#include "target-helpers/inline_debug_helper.h" +#include "state_tracker/drm_driver.h" +#include "radeon/drm/radeon_drm_public.h" +#include "r300/r300_public.h" + +static struct pipe_screen * +create_screen(int fd) +{ + struct r300_winsys_screen *sws; + struct pipe_screen *screen; + + sws = r300_drm_winsys_screen_create(fd); + if (!sws) + return NULL; + + screen = r300_screen_create(sws); + if (!screen) + return NULL; + + screen = debug_screen_wrap(screen); + + return screen; +} + +DRM_DRIVER_DESCRIPTOR("radeon", "radeon", create_screen) |