summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/r600
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/r600')
-rw-r--r--src/gallium/targets/r600/common/drm_target.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/gallium/targets/r600/common/drm_target.c b/src/gallium/targets/r600/common/drm_target.c
index ab1eec6ac9a..09250c79fb9 100644
--- a/src/gallium/targets/r600/common/drm_target.c
+++ b/src/gallium/targets/r600/common/drm_target.c
@@ -35,19 +35,8 @@ static struct pipe_screen *create_screen(int fd)
{
struct radeon_winsys *radeon;
- radeon = radeon_drm_winsys_create(fd);
- if (!radeon)
- return NULL;
-
- if (!radeon->screen) {
- radeon->screen = r600_screen_create(radeon);
- if (!radeon->screen)
- return NULL;
-
- radeon->screen = debug_screen_wrap(radeon->screen);
- }
-
- return radeon->screen;
+ radeon = radeon_drm_winsys_create(fd, r600_screen_create);
+ return radeon ? debug_screen_wrap(radeon->screen) : NULL;
}
static const struct drm_conf_ret throttle_ret = {