diff options
author | Bruno Jiménez <[email protected]> | 2014-06-18 17:01:53 +0200 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2014-06-20 13:43:50 -0400 |
commit | e3dfe3f7b2323428d68851341f541944a89d1783 (patch) | |
tree | c9c4dfb681ac04b5435e62790b601282a12b270d /src/gallium/drivers/r600/evergreen_compute.c | |
parent | 9e491eb5d7d9257d5e8c70865a042c6a4f5480d3 (diff) |
r600g/compute: Add statuses to the compute_memory_items
These statuses will help track whether the items are mapped
or if they should be promoted to or demoted from the pool
v2: Use the new is_item_in_pool util function,
as suggested by Tom Stellard
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_compute.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_compute.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index c152e54146a..8657071e4c6 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -659,6 +659,15 @@ static void evergreen_set_global_binding( return; } + /* We mark these items for promotion to the pool if they + * aren't already there */ + for (int i = 0; i < n; i++) { + struct compute_memory_item *item = buffers[i]->chunk; + + if (!is_item_in_pool(item)) + buffers[i]->chunk->status |= ITEM_FOR_PROMOTING; + } + compute_memory_finalize_pending(pool, ctx_); for (int i = 0; i < n; i++) @@ -969,6 +978,9 @@ void *r600_compute_global_transfer_map( offset += (buffer->chunk->start_in_dw * 4); } + if (usage & PIPE_TRANSFER_READ) + buffer->chunk->status |= ITEM_MAPPED_FOR_READING; + COMPUTE_DBG(rctx->screen, "* r600_compute_global_transfer_map()\n" "level = %u, usage = %u, box(x = %u, y = %u, z = %u " "width = %u, height = %u, depth = %u)\n", level, usage, |