summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Sapountzis <[email protected]>2010-03-21 15:01:36 +0200
committerGeorge Sapountzis <[email protected]>2010-03-21 15:03:13 +0200
commit5d524cce9c4fcc18ed977801d59ba7bb911020db (patch)
tree2ac2b60be742858e2c0385081976148822783304
parentf87a5f6499f51f651c2a9f2d4682875b22926905 (diff)
drm/sw: just s/softpipe_create_screen/gallium_soft_create_screen/
This partially reverts commit f87a5f6499f51f651c2a9f2d4682875b22926905.
-rw-r--r--src/gallium/winsys/drm/sw/sw_drm_api.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/gallium/winsys/drm/sw/sw_drm_api.c b/src/gallium/winsys/drm/sw/sw_drm_api.c
index ed3ce146eb1..fa16600fe6a 100644
--- a/src/gallium/winsys/drm/sw/sw_drm_api.c
+++ b/src/gallium/winsys/drm/sw/sw_drm_api.c
@@ -24,11 +24,9 @@
**********************************************************/
-#include "pipe/p_screen.h"
#include "util/u_memory.h"
#include "target-helpers/soft_screen.h"
-#include "state_tracker/sw_winsys.h"
#include "state_tracker/drm_api.h"
#include "wrapper_sw_winsys.h"
#include "sw_drm_api.h"
@@ -43,6 +41,7 @@ struct sw_drm_api
{
struct drm_api base;
struct drm_api *api;
+ struct sw_winsys *sw;
};
static INLINE struct sw_drm_api *
@@ -63,35 +62,14 @@ sw_drm_create_screen(struct drm_api *_api, int drmFD,
{
struct sw_drm_api *swapi = sw_drm_api(_api);
struct drm_api *api = swapi->api;
- struct sw_winsys *sww = NULL;
- struct pipe_screen *screen = NULL;
- struct pipe_screen *soft_screen = NULL;
+ struct sw_winsys *sww;
+ struct pipe_screen *screen;
screen = api->create_screen(api, drmFD, arg);
- if (screen == NULL)
- goto fail;
sww = wrapper_sw_winsys_warp_pipe_screen(screen);
- if (sww == NULL)
- goto fail;
- soft_screen = gallium_soft_create_screen(sww);
- if (soft_screen == NULL)
- goto fail;
-
- return soft_screen;
-
-fail:
- if (soft_screen)
- soft_screen->destroy(soft_screen);
-
- if (sww)
- sww->destroy(sww);
-
- if (screen)
- screen->destroy(screen);
-
- return NULL;
+ return gallium_soft_create_screen(sww);
}
static void