summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-06-27 09:46:24 +0100
committerAlan Hourihane <alanh@tungstengraphics.com>2008-06-27 09:46:24 +0100
commit038ba94f415e5289d7b68de55c28385f8d215e4a (patch)
tree56d650291031c4d19633c4b99c43e13103d7edcf
parent0399bd57838141ca1d39d91a274cfcb1d132ef94 (diff)
More error checking
-rw-r--r--src/exa.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/exa.c b/src/exa.c
index a804feb..5cf1d96 100644
--- a/src/exa.c
+++ b/src/exa.c
@@ -695,11 +695,6 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
struct exa_entity *exa = ms->exa;
- if (rootPixmap == pPixmap) {
- miModifyPixmapHeader(pPixmap, width, height, depth,
- bitsPerPixel, devKind, NULL);
- }
-
if (!priv)
return FALSE;
@@ -718,6 +713,9 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
if (width <= 0 || height <= 0 || depth <= 0)
return FALSE;
+ miModifyPixmapHeader(pPixmap, width, height, depth,
+ bitsPerPixel, devKind, NULL);
+
/* Deal with screen resize */
if (priv->tex) {
struct pipe_surface *surf =
@@ -750,9 +748,6 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
priv->tex = exa->scrn->texture_create(exa->scrn, &template);
}
- if (rootPixmap == pPixmap)
- return TRUE;
-
return TRUE;
}
@@ -826,17 +821,22 @@ ExaInit(ScrnInfoPtr pScrn)
"%s/%s_dri.so", dri_driver_path, "i915");
ms->driver = dlopen(filename, RTLD_NOW | RTLD_DEEPBIND | RTLD_GLOBAL);
+ if (!ms->driver)
+ FatalError("failed to initialize i915 - for softpipe only.\n");
exa->c = xcalloc(1, sizeof(struct exa_context));
exa->ws = exa_get_pipe_winsys(ms);
+ if (!exa->ws)
+ FatalError("BAD WINSYS\n");
exa->scrn = softpipe_create_screen(exa->ws);
+ if (!exa->scrn)
+ FatalError("BAD SCREEN\n");
exa->ctx = softpipe_create(exa->scrn, exa->ws, NULL);
-
if (!exa->ctx)
- ErrorF("BAD CTX\n");
+ FatalError("BAD CTX\n");
exa->ctx->priv = exa->c;
}