diff options
author | Chia-I Wu <[email protected]> | 2013-05-20 12:13:34 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-05-21 11:47:20 +0800 |
commit | 0d42a9e9414a1c015e1ceced4d773a455e5b39d1 (patch) | |
tree | 14557a6a80f12047f813d2e7d610d9e70733a7bc /src/gallium/drivers/ilo/ilo_3d.h | |
parent | a04d8574c61f286fd9ec51f667648f73e332462f (diff) |
ilo: replace cp hooks by cp owner and flush callback
The problem with cp hooks is that when we switch from 3D ring to 2D ring, and
when there are active queries, we will emit 3D commands to 2D ring because
the new-batch hook is called.
This commit introduces the idea of cp owner. When the cp is flushed, or when
another owner takes place, the current owner is notified, giving it a chance
to emit whatever commands there need to be. With this mechanism, we can
resume queries when the 3D pipeline owns the cp, and pause queries when it
loses the cp. Ring switch will just work.
As we still need to know when the cp bo is reallocated, a flush callback is
added.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_3d.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_3d.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d.h b/src/gallium/drivers/ilo/ilo_3d.h index 044959821aa..3e67c8521d6 100644 --- a/src/gallium/drivers/ilo/ilo_3d.h +++ b/src/gallium/drivers/ilo/ilo_3d.h @@ -29,10 +29,10 @@ #define ILO_3D_H #include "ilo_common.h" +#include "ilo_cp.h" struct ilo_3d_pipeline; struct ilo_context; -struct ilo_cp; struct ilo_query; /** @@ -40,6 +40,8 @@ struct ilo_query; */ struct ilo_3d { struct ilo_cp *cp; + struct ilo_cp_owner owner; + int owner_reserve; bool new_batch; uint32_t shader_cache_seqno; @@ -64,13 +66,7 @@ void ilo_3d_destroy(struct ilo_3d *hw3d); void -ilo_3d_new_cp_batch(struct ilo_3d *hw3d); - -void -ilo_3d_pre_cp_flush(struct ilo_3d *hw3d); - -void -ilo_3d_post_cp_flush(struct ilo_3d *hw3d); +ilo_3d_cp_flushed(struct ilo_3d *hw3d); void ilo_3d_begin_query(struct ilo_context *ilo, struct ilo_query *q); |