summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_cp.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-03-09 21:55:23 +0800
committerChia-I Wu <[email protected]>2014-03-10 16:42:42 +0800
commit0b462d3ab13af9bba9c9b21bf67de6d2b1857786 (patch)
treefcdca028f1308b5ec8418623de1c8e0c3f1e59a1 /src/gallium/drivers/ilo/ilo_cp.c
parent42c1ce4c03c0c5f4fb61b981143cf2638d87c834 (diff)
ilo: move ring types to winsys
It results in less code despite that i915_drm.h specifies the ring type as part of the execution flags.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_cp.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_cp.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c
index cd94eec0fe5..49dc237d72f 100644
--- a/src/gallium/drivers/ilo/ilo_cp.c
+++ b/src/gallium/drivers/ilo/ilo_cp.c
@@ -182,27 +182,11 @@ static int
ilo_cp_exec_bo(struct ilo_cp *cp)
{
const bool do_exec = !(ilo_debug & ILO_DEBUG_NOHW);
- unsigned long flags;
int err;
- switch (cp->ring) {
- case ILO_CP_RING_RENDER:
- flags = INTEL_EXEC_RENDER;
- break;
- case ILO_CP_RING_BLT:
- flags = INTEL_EXEC_BLT;
- break;
- default:
- assert(!"unknown cp ring");
- flags = 0;
- break;
- }
-
- flags |= cp->one_off_flags;
-
if (likely(do_exec)) {
- err = intel_winsys_submit_bo(cp->winsys,
- cp->bo, cp->used * 4, cp->render_ctx, flags);
+ err = intel_winsys_submit_bo(cp->winsys, cp->ring,
+ cp->bo, cp->used * 4, cp->render_ctx, cp->one_off_flags);
}
else {
err = 0;
@@ -283,7 +267,7 @@ ilo_cp_create(struct intel_winsys *winsys, int size, bool direct_map)
cp->winsys = winsys;
cp->render_ctx = intel_winsys_create_context(winsys);
- cp->ring = ILO_CP_RING_RENDER;
+ cp->ring = INTEL_RING_RENDER;
cp->no_implicit_flush = false;
cp->bo_size = size;