summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/pipe-loader
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/pipe-loader')
-rw-r--r--src/gallium/targets/pipe-loader/pipe_r300.c14
-rw-r--r--src/gallium/targets/pipe-loader/pipe_r600.c14
-rw-r--r--src/gallium/targets/pipe-loader/pipe_radeonsi.c14
3 files changed, 6 insertions, 36 deletions
diff --git a/src/gallium/targets/pipe-loader/pipe_r300.c b/src/gallium/targets/pipe-loader/pipe_r300.c
index 055685996e6..388b091f144 100644
--- a/src/gallium/targets/pipe-loader/pipe_r300.c
+++ b/src/gallium/targets/pipe-loader/pipe_r300.c
@@ -8,19 +8,9 @@ static struct pipe_screen *
create_screen(int fd)
{
struct radeon_winsys *sws;
- struct pipe_screen *screen;
- sws = radeon_drm_winsys_create(fd);
- if (!sws)
- return NULL;
-
- screen = r300_screen_create(sws);
- if (!screen)
- return NULL;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
+ sws = radeon_drm_winsys_create(fd, r300_screen_create);
+ return sws ? debug_screen_wrap(sws->screen) : NULL;
}
PUBLIC
diff --git a/src/gallium/targets/pipe-loader/pipe_r600.c b/src/gallium/targets/pipe-loader/pipe_r600.c
index 5d89aca6ec3..0c590875784 100644
--- a/src/gallium/targets/pipe-loader/pipe_r600.c
+++ b/src/gallium/targets/pipe-loader/pipe_r600.c
@@ -7,19 +7,9 @@ static struct pipe_screen *
create_screen(int fd)
{
struct radeon_winsys *rw;
- struct pipe_screen *screen;
- rw = radeon_drm_winsys_create(fd);
- if (!rw)
- return NULL;
-
- screen = r600_screen_create(rw);
- if (!screen)
- return NULL;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
+ rw = radeon_drm_winsys_create(fd, r600_screen_create);
+ return rw ? debug_screen_wrap(rw->screen) : NULL;
}
PUBLIC
diff --git a/src/gallium/targets/pipe-loader/pipe_radeonsi.c b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
index 48b2b5dff3f..406ba1e1ddb 100644
--- a/src/gallium/targets/pipe-loader/pipe_radeonsi.c
+++ b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
@@ -7,19 +7,9 @@ static struct pipe_screen *
create_screen(int fd)
{
struct radeon_winsys *rw;
- struct pipe_screen *screen;
- rw = radeon_drm_winsys_create(fd);
- if (!rw)
- return NULL;
-
- screen = radeonsi_screen_create(rw);
- if (!screen)
- return NULL;
-
- screen = debug_screen_wrap(screen);
-
- return screen;
+ rw = radeon_drm_winsys_create(fd, radeonsi_screen_create);
+ return rw ? debug_screen_wrap(rw->screen) : NULL;
}
PUBLIC