diff options
author | Chia-I Wu <[email protected]> | 2014-09-19 14:37:56 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-09-19 16:02:11 +0800 |
commit | 1887d15eede63927152f7f664061e7efe7d16185 (patch) | |
tree | adee58f3222856d43f017bc4cf938284b75f211f /src/gallium | |
parent | 270667472fa3e406b4748488718fdb3a7ef24e28 (diff) |
ilo: remove ilo_cp_empty()
Call ilo_builder_batch_used() directly.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_3d_pipeline.c | 23 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_blitter_rectlist.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_cp.h | 9 |
3 files changed, 12 insertions, 22 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline.c b/src/gallium/drivers/ilo/ilo_3d_pipeline.c index bbac8ce4278..baadfa7838a 100644 --- a/src/gallium/drivers/ilo/ilo_3d_pipeline.c +++ b/src/gallium/drivers/ilo/ilo_3d_pipeline.c @@ -170,7 +170,6 @@ ilo_3d_pipeline_emit_draw(struct ilo_3d_pipeline *p, ilo_cp_set_one_off_flags(p->cp, INTEL_EXEC_GEN7_SOL_RESET); } - while (true) { struct ilo_builder_snapshot snapshot; @@ -184,20 +183,20 @@ ilo_3d_pipeline_emit_draw(struct ilo_3d_pipeline *p, if (ilo_builder_validate(&ilo->cp->builder, 0, NULL)) { success = true; - break; - } + } else { + /* rewind */ + ilo_builder_batch_restore(&p->cp->builder, &snapshot); - /* rewind */ - ilo_builder_batch_restore(&p->cp->builder, &snapshot); + /* flush and try again */ + if (ilo_builder_batch_used(&p->cp->builder)) { + ilo_cp_flush(p->cp, "out of aperture"); + continue; + } - if (ilo_cp_empty(p->cp)) { success = false; - break; - } - else { - /* flush and try again */ - ilo_cp_flush(p->cp, "out of aperture"); } + + break; } if (success) { @@ -291,7 +290,7 @@ ilo_3d_pipeline_emit_rectlist(struct ilo_3d_pipeline *p, ilo_builder_batch_restore(&p->cp->builder, &snapshot); /* flush and try again */ - if (!ilo_cp_empty(p->cp)) { + if (ilo_builder_batch_used(&p->cp->builder)) { ilo_cp_flush(p->cp, "out of aperture"); continue; } diff --git a/src/gallium/drivers/ilo/ilo_blitter_rectlist.c b/src/gallium/drivers/ilo/ilo_blitter_rectlist.c index c77b8e14971..c77eac36bc6 100644 --- a/src/gallium/drivers/ilo/ilo_blitter_rectlist.c +++ b/src/gallium/drivers/ilo/ilo_blitter_rectlist.c @@ -334,7 +334,7 @@ hiz_emit_rectlist(struct ilo_blitter *blitter) * - we may sample from a texture that was rendered to * - we may sample from the fb shortly after */ - if (!ilo_cp_empty(p->cp)) + if (ilo_builder_batch_used(&p->cp->builder)) ilo_3d_pipeline_emit_flush(p); ilo_3d_pipeline_emit_rectlist(p, blitter); diff --git a/src/gallium/drivers/ilo/ilo_cp.h b/src/gallium/drivers/ilo/ilo_cp.h index 0f27e8e590d..c313745ea87 100644 --- a/src/gallium/drivers/ilo/ilo_cp.h +++ b/src/gallium/drivers/ilo/ilo_cp.h @@ -102,15 +102,6 @@ ilo_cp_set_owner(struct ilo_cp *cp, enum intel_ring_type ring, const struct ilo_cp_owner *owner); /** - * Return true if the parser buffer is empty. - */ -static inline bool -ilo_cp_empty(struct ilo_cp *cp) -{ - return !ilo_builder_batch_used(&cp->builder); -} - -/** * Return the remaining space (in dwords) in the parser buffer. */ static inline int |