diff options
author | Chia-I Wu <[email protected]> | 2013-05-17 16:10:11 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-05-21 11:47:19 +0800 |
commit | a04d8574c61f286fd9ec51f667648f73e332462f (patch) | |
tree | bc2ebf14f84b8df57dbbb01eeaf66794b6bbda49 /src/gallium/drivers/ilo/ilo_cp.c | |
parent | 1ed7b825cf3e9395dc1452059af6deb74a64f225 (diff) |
ilo: harware contexts are only for the render ring
The hardware context should not be passed for bo execution when the ring is
not the render ring. Rename hw_ctx to render_ctx for clarity.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_cp.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_cp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c index 41473c0f770..b67c872e2af 100644 --- a/src/gallium/drivers/ilo/ilo_cp.c +++ b/src/gallium/drivers/ilo/ilo_cp.c @@ -176,17 +176,21 @@ static int ilo_cp_exec_bo(struct ilo_cp *cp) { const bool do_exec = !(ilo_debug & ILO_DEBUG_NOHW); + struct intel_context *ctx; unsigned long flags; int err; switch (cp->ring) { case ILO_CP_RING_RENDER: + ctx = cp->render_ctx; flags = INTEL_EXEC_RENDER; break; case ILO_CP_RING_BLT: + ctx = NULL; flags = INTEL_EXEC_BLT; break; default: + ctx = NULL; flags = 0; break; } @@ -194,7 +198,7 @@ ilo_cp_exec_bo(struct ilo_cp *cp) flags |= cp->one_off_flags; if (likely(do_exec)) - err = cp->bo->exec(cp->bo, cp->used * 4, cp->hw_ctx, flags); + err = cp->bo->exec(cp->bo, cp->used * 4, ctx, flags); else err = 0; @@ -274,8 +278,8 @@ ilo_cp_destroy(struct ilo_cp *cp) { if (cp->bo) cp->bo->unreference(cp->bo); - if (cp->hw_ctx) - cp->winsys->destroy_context(cp->winsys, cp->hw_ctx); + if (cp->render_ctx) + cp->winsys->destroy_context(cp->winsys, cp->render_ctx); FREE(cp->sys); FREE(cp); @@ -294,7 +298,7 @@ ilo_cp_create(struct intel_winsys *winsys, bool direct_map) return NULL; cp->winsys = winsys; - cp->hw_ctx = winsys->create_context(winsys); + cp->render_ctx = winsys->create_context(winsys); cp->ring = ILO_CP_RING_RENDER; cp->no_implicit_flush = false; |