summaryrefslogtreecommitdiff
path: root/src/gallium/targets/dri-radeong
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-06-28 20:59:09 +0200
committerJakob Bornecrantz <jakob@vmware.com>2010-06-28 21:14:45 +0200
commita01e0afd9fc0d647081c6903baa1a7ba505c4b05 (patch)
tree7e04eb2b4e87137455920f6131b064dc87056e14 /src/gallium/targets/dri-radeong
parent250b92f3bb4fc4a53f3150b0e8ff1e121a5adbc7 (diff)
parent9ca563a9a8573bf79821abc75ccf0fdade19c8a9 (diff)
Merge branch 'gallium-drm-driver-drescriptor'
Conflicts: src/gallium/state_trackers/egl/x11/native_dri2.c src/gallium/state_trackers/egl/x11/native_x11.c src/gallium/state_trackers/egl/x11/native_x11.h src/gallium/state_trackers/xorg/xorg_driver.c src/gallium/winsys/radeon/drm/radeon_drm.c
Diffstat (limited to 'src/gallium/targets/dri-radeong')
-rw-r--r--src/gallium/targets/dri-radeong/Makefile4
-rw-r--r--src/gallium/targets/dri-radeong/SConscript4
-rw-r--r--src/gallium/targets/dri-radeong/dummy.c0
-rw-r--r--src/gallium/targets/dri-radeong/target.c26
4 files changed, 33 insertions, 1 deletions
diff --git a/src/gallium/targets/dri-radeong/Makefile b/src/gallium/targets/dri-radeong/Makefile
index 8ba1972ffa..a0ee9f1d18 100644
--- a/src/gallium/targets/dri-radeong/Makefile
+++ b/src/gallium/targets/dri-radeong/Makefile
@@ -13,9 +13,13 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/r300/libr300.a
C_SOURCES = \
+ target.c \
$(COMMON_GALLIUM_SOURCES) \
$(DRIVER_SOURCES)
+DRIVER_DEFINES = \
+ -DGALLIUM_RBUG -DGALLIUM_TRACE
+
include ../Makefile.dri
DRI_LIB_DEPS += -ldrm_radeon
diff --git a/src/gallium/targets/dri-radeong/SConscript b/src/gallium/targets/dri-radeong/SConscript
index 4c6cfb84eb..ffac73af84 100644
--- a/src/gallium/targets/dri-radeong/SConscript
+++ b/src/gallium/targets/dri-radeong/SConscript
@@ -8,6 +8,8 @@ env = drienv.Clone()
env.ParseConfig('pkg-config --cflags --libs libdrm_radeon')
+env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE'])
+
env.Prepend(LIBS = [
st_dri,
radeonwinsys,
@@ -22,6 +24,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..5a0a8dc573
--- /dev/null
+++ b/src/gallium/targets/dri-radeong/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)