diff options
author | Chia-I Wu <[email protected]> | 2014-03-10 12:31:30 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-03-10 16:42:42 +0800 |
commit | 747627d0456eb14b2fb4c320c5bf0f084f3b2907 (patch) | |
tree | 02ef5afc14332fec41f0f8a46e341e2c499815aa /src/gallium/drivers/ilo | |
parent | 72956ed374b73391d4d033722d3032fa6496b5cb (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')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_3d.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_common.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_cp.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_screen.c | 6 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c index 1e5ebbcabd8..7615e7c62f8 100644 --- a/src/gallium/drivers/ilo/ilo_3d.c +++ b/src/gallium/drivers/ilo/ilo_3d.c @@ -315,10 +315,6 @@ ilo_3d_cp_flushed(struct ilo_3d *hw3d) ilo_3d_pipeline_invalidate(hw3d->pipeline, ILO_3D_PIPELINE_INVALIDATE_BATCH_BO | ILO_3D_PIPELINE_INVALIDATE_STATE_BO); - if (!hw3d->cp->render_ctx) { - ilo_3d_pipeline_invalidate(hw3d->pipeline, - ILO_3D_PIPELINE_INVALIDATE_HW); - } hw3d->new_batch = true; } diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c index 4263882c4bd..953e3e32b54 100644 --- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c +++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c @@ -422,12 +422,6 @@ gen7_pipeline_sol(struct ilo_3d_pipeline *p, const int stride = so_info->stride[i] * 4; /* in bytes */ int base = 0; - /* reset HW write offsets and offset buffer base */ - if (!p->cp->render_ctx) { - ilo_cp_set_one_off_flags(p->cp, INTEL_EXEC_GEN7_SOL_RESET); - base += p->state.so_num_vertices * stride; - } - gen7_emit_3DSTATE_SO_BUFFER(p->dev, i, base, stride, ilo->so.states[i], p->cp); } diff --git a/src/gallium/drivers/ilo/ilo_common.h b/src/gallium/drivers/ilo/ilo_common.h index 6a2649b354f..db7fdc7f1fa 100644 --- a/src/gallium/drivers/ilo/ilo_common.h +++ b/src/gallium/drivers/ilo/ilo_common.h @@ -71,6 +71,7 @@ struct ilo_dev_info { int max_batch_size; bool has_llc; bool has_address_swizzling; + bool has_logical_context; bool has_timestamp; bool has_gen7_sol_reset; 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; diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c index 8656d18806f..5d652e4ad73 100644 --- a/src/gallium/drivers/ilo/ilo_screen.c +++ b/src/gallium/drivers/ilo/ilo_screen.c @@ -651,9 +651,15 @@ init_dev(struct ilo_dev_info *dev, const struct intel_winsys_info *info) dev->max_batch_size = info->max_batch_size; dev->has_llc = info->has_llc; dev->has_address_swizzling = info->has_address_swizzling; + dev->has_logical_context = info->has_logical_context; dev->has_timestamp = info->has_timestamp; dev->has_gen7_sol_reset = info->has_gen7_sol_reset; + if (!dev->has_logical_context) { + ilo_err("missing hardware logical context support\n"); + return false; + } + /* * From the Sandy Bridge PRM, volume 4 part 2, page 18: * |