diff options
Diffstat (limited to 'src/gallium/targets/dri-r600')
-rw-r--r-- | src/gallium/targets/dri-r600/Makefile | 4 | ||||
-rw-r--r-- | src/gallium/targets/dri-r600/SConscript | 4 | ||||
-rw-r--r-- | src/gallium/targets/dri-r600/dummy.c | 0 | ||||
-rw-r--r-- | src/gallium/targets/dri-r600/target.c | 26 |
4 files changed, 33 insertions, 1 deletions
diff --git a/src/gallium/targets/dri-r600/Makefile b/src/gallium/targets/dri-r600/Makefile index 0213200fbcc..932303d194e 100644 --- a/src/gallium/targets/dri-r600/Makefile +++ b/src/gallium/targets/dri-r600/Makefile @@ -12,9 +12,13 @@ PIPE_DRIVERS = \ $(TOP)/src/gallium/drivers/r600/libr600.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-r600/SConscript b/src/gallium/targets/dri-r600/SConscript index 6c23c050eb8..97c5df01fe2 100644 --- a/src/gallium/targets/dri-r600/SConscript +++ b/src/gallium/targets/dri-r600/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, r600drm, @@ -22,6 +24,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 e69de29bb2d..00000000000 --- 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 00000000000..a01f4ed49fd --- /dev/null +++ b/src/gallium/targets/dri-r600/target.c @@ -0,0 +1,26 @@ + +#include "state_tracker/drm_driver.h" +#include "target-helpers/inline_debug_helper.h" +#include "r600/drm/r600_drm_public.h" +#include "r600/r600_public.h" + +static struct pipe_screen * +create_screen(int fd) +{ + struct radeon *rw; + struct pipe_screen *screen; + + rw = r600_drm_winsys_create(fd); + if (!rw) + return NULL; + + screen = r600_screen_create(rw); + if (!screen) + return NULL; + + screen = debug_screen_wrap(screen); + + return screen; +} + +DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen) |