diff options
author | Marek Olšák <[email protected]> | 2015-07-16 14:54:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-23 00:59:24 +0200 |
commit | 5e3974338ed7ea49a41405f8c2e4bcd5fd1f5c80 (patch) | |
tree | b194a1203454ac94ee7d43c5368e819e4506c416 /src/gallium/drivers/radeon/r600_query.c | |
parent | 0aa2446e2c18e4a54ccf8555a8ff3426e4eb3ded (diff) |
gallium/radeon: remove buffer_unmap calls that can potentially decrease perf
buffer_unmap is currently a no-op on radeon and done correctly on amdgpu.
I plan to fix it for radeon, but before that, all occurences of buffer_unmap
that can negatively affect performance in the future must be removed.
There are 2 reasons for removing buffer_unmap calls:
- There is a likelihood that buffer_map will be called again, so we don't
want to unmap yet.
- The buffer is being released, which automatically unmaps it.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_query.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 71f4a1522f9..a1d8241c513 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -118,7 +118,6 @@ static struct r600_resource *r600_new_query_buffer(struct r600_common_context *c } results += 4 * ctx->max_db; } - ctx->ws->buffer_unmap(buf->cs_buf); break; case PIPE_QUERY_TIME_ELAPSED: case PIPE_QUERY_TIMESTAMP: @@ -130,7 +129,6 @@ static struct r600_resource *r600_new_query_buffer(struct r600_common_context *c case PIPE_QUERY_PIPELINE_STATISTICS: results = r600_buffer_map_sync_with_rings(ctx, buf, PIPE_TRANSFER_WRITE); memset(results, 0, buf_size); - ctx->ws->buffer_unmap(buf->cs_buf); break; default: assert(0); @@ -751,7 +749,6 @@ static boolean r600_get_query_buffer_result(struct r600_common_context *ctx, assert(0); } - ctx->ws->buffer_unmap(qbuf->buf->cs_buf); return TRUE; } @@ -919,7 +916,6 @@ void r600_query_init_backend_mask(struct r600_common_context *ctx) results = r600_buffer_map_sync_with_rings(ctx, buffer, PIPE_TRANSFER_WRITE); if (results) { memset(results, 0, ctx->max_db * 4 * 4); - ctx->ws->buffer_unmap(buffer->cs_buf); /* emit EVENT_WRITE for ZPASS_DONE */ radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 2, 0)); @@ -937,7 +933,6 @@ void r600_query_init_backend_mask(struct r600_common_context *ctx) if (results[i*4 + 1]) mask |= (1<<i); } - ctx->ws->buffer_unmap(buffer->cs_buf); } } |