summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_transfer.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-09-19 15:24:23 +0800
committerChia-I Wu <[email protected]>2014-09-19 16:02:11 +0800
commit8a2352262e27bf7d3c31a20b72eb04772d56ff42 (patch)
treedb6bdccfaf3476ce8b7d7e0d9c9f711c792e270a /src/gallium/drivers/ilo/ilo_transfer.c
parent1887d15eede63927152f7f664061e7efe7d16185 (diff)
ilo: rename ilo_cp_flush()
"Flush" is used for too many things already: pipe resource flush, pipe context flush, pipe transfer region flush, and hardware pipeline flush. Rename it to ilo_cp_submit(). As such, ILO_DEBUG=flush is renamed to ILO_DEBUG=submit.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_transfer.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_transfer.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/drivers/ilo/ilo_transfer.c b/src/gallium/drivers/ilo/ilo_transfer.c
index f1186ff1c65..3062bf5435f 100644
--- a/src/gallium/drivers/ilo/ilo_transfer.c
+++ b/src/gallium/drivers/ilo/ilo_transfer.c
@@ -1043,12 +1043,12 @@ copy_staging_resource(struct ilo_context *ilo,
}
static bool
-is_bo_busy(struct ilo_context *ilo, struct intel_bo *bo, bool *need_flush)
+is_bo_busy(struct ilo_context *ilo, struct intel_bo *bo, bool *need_submit)
{
const bool referenced = ilo_builder_has_reloc(&ilo->cp->builder, bo);
- if (need_flush)
- *need_flush = referenced;
+ if (need_submit)
+ *need_submit = referenced;
if (referenced)
return true;
@@ -1064,22 +1064,22 @@ static bool
choose_transfer_method(struct ilo_context *ilo, struct ilo_transfer *xfer)
{
struct pipe_resource *res = xfer->base.resource;
- bool need_flush;
+ bool need_submit;
if (!resource_get_transfer_method(res, &xfer->base, &xfer->method))
return false;
/* see if we can avoid blocking */
- if (is_bo_busy(ilo, ilo_resource_get_bo(res), &need_flush)) {
+ if (is_bo_busy(ilo, ilo_resource_get_bo(res), &need_submit)) {
bool resource_renamed;
if (!xfer_unblock(xfer, &resource_renamed)) {
if (xfer->base.usage & PIPE_TRANSFER_DONTBLOCK)
return false;
- /* flush to make bo really busy so that map() correctly blocks */
- if (need_flush)
- ilo_cp_flush(ilo->cp, "syncing for transfers");
+ /* submit to make bo really busy and map() correctly blocks */
+ if (need_submit)
+ ilo_cp_submit(ilo->cp, "syncing for transfers");
}
if (resource_renamed)
@@ -1093,10 +1093,10 @@ static void
buf_pwrite(struct ilo_context *ilo, struct ilo_buffer *buf,
unsigned usage, int offset, int size, const void *data)
{
- bool need_flush;
+ bool need_submit;
/* see if we can avoid blocking */
- if (is_bo_busy(ilo, buf->bo, &need_flush)) {
+ if (is_bo_busy(ilo, buf->bo, &need_submit)) {
bool unblocked = false;
if ((usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) &&
@@ -1132,9 +1132,9 @@ buf_pwrite(struct ilo_context *ilo, struct ilo_buffer *buf,
}
}
- /* flush to make bo really busy so that pwrite() correctly blocks */
- if (!unblocked && need_flush)
- ilo_cp_flush(ilo->cp, "syncing for pwrites");
+ /* submit to make bo really busy and pwrite() correctly blocks */
+ if (!unblocked && need_submit)
+ ilo_cp_submit(ilo->cp, "syncing for pwrites");
}
intel_bo_pwrite(buf->bo, offset, size, data);