aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_cp.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-03-10 12:31:30 +0800
committerChia-I Wu <[email protected]>2014-03-10 16:42:42 +0800
commit747627d0456eb14b2fb4c320c5bf0f084f3b2907 (patch)
tree02ef5afc14332fec41f0f8a46e341e2c499815aa /src/gallium/drivers/ilo/ilo_cp.c
parent72956ed374b73391d4d033722d3032fa6496b5cb (diff)
ilo: require hardware logical context support
The code paths are not tested for a while, and have some known issues.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_cp.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_cp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c
index 49dc237d72f..16871f971ec 100644
--- a/src/gallium/drivers/ilo/ilo_cp.c
+++ b/src/gallium/drivers/ilo/ilo_cp.c
@@ -245,8 +245,7 @@ ilo_cp_destroy(struct ilo_cp *cp)
intel_bo_unreference(cp->bo);
}
- if (cp->render_ctx)
- intel_winsys_destroy_context(cp->winsys, cp->render_ctx);
+ intel_winsys_destroy_context(cp->winsys, cp->render_ctx);
FREE(cp->sys);
FREE(cp);
@@ -266,6 +265,10 @@ ilo_cp_create(struct intel_winsys *winsys, int size, bool direct_map)
cp->winsys = winsys;
cp->render_ctx = intel_winsys_create_context(winsys);
+ if (!cp->render_ctx) {
+ FREE(cp);
+ return NULL;
+ }
cp->ring = INTEL_RING_RENDER;
cp->no_implicit_flush = false;