diff options
author | Marek Olšák <[email protected]> | 2012-04-26 12:02:31 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-29 14:46:52 +0200 |
commit | 0a6120244e66494db070ce875c0a464fbc5b15a1 (patch) | |
tree | 400b5129e5ae2edbca42039224ee27a22c835816 /src/gallium/drivers/r600/r600_query.c | |
parent | 8e90913e9f99ff3296a3c3da36e73cd2d4730269 (diff) |
winsys/radeon: simplify buffer map/unmap functions
The idea is not to use pb_map and pb_unmap wrappers, calling straight
into the winsys.
Diffstat (limited to 'src/gallium/drivers/r600/r600_query.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_query.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c index 9632d18e391..90b7a66d614 100644 --- a/src/gallium/drivers/r600/r600_query.c +++ b/src/gallium/drivers/r600/r600_query.c @@ -52,7 +52,7 @@ static struct r600_resource *r600_new_query_buffer(struct r600_context *ctx, uns switch (type) { case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_PREDICATE: - results = ctx->ws->buffer_map(buf->buf, ctx->cs, PIPE_TRANSFER_WRITE); + results = ctx->ws->buffer_map(buf->cs_buf, ctx->cs, PIPE_TRANSFER_WRITE); memset(results, 0, buf_size); /* Set top bits for unused backends. */ @@ -66,7 +66,7 @@ static struct r600_resource *r600_new_query_buffer(struct r600_context *ctx, uns } results += 4 * ctx->max_db; } - ctx->ws->buffer_unmap(buf->buf); + ctx->ws->buffer_unmap(buf->cs_buf); break; case PIPE_QUERY_TIME_ELAPSED: break; @@ -74,9 +74,9 @@ static struct r600_resource *r600_new_query_buffer(struct r600_context *ctx, uns case PIPE_QUERY_PRIMITIVES_GENERATED: case PIPE_QUERY_SO_STATISTICS: case PIPE_QUERY_SO_OVERFLOW_PREDICATE: - results = ctx->ws->buffer_map(buf->buf, ctx->cs, PIPE_TRANSFER_WRITE); + results = ctx->ws->buffer_map(buf->cs_buf, ctx->cs, PIPE_TRANSFER_WRITE); memset(results, 0, buf_size); - ctx->ws->buffer_unmap(buf->buf); + ctx->ws->buffer_unmap(buf->cs_buf); break; default: assert(0); @@ -406,7 +406,7 @@ static boolean r600_get_query_buffer_result(struct r600_context *ctx, unsigned results_base = 0; char *map; - map = ctx->ws->buffer_map(qbuf->buf->buf, ctx->cs, + map = ctx->ws->buffer_map(qbuf->buf->cs_buf, ctx->cs, PIPE_TRANSFER_READ | (wait ? 0 : PIPE_TRANSFER_DONTBLOCK)); if (!map) @@ -477,7 +477,7 @@ static boolean r600_get_query_buffer_result(struct r600_context *ctx, assert(0); } - ctx->ws->buffer_unmap(qbuf->buf->buf); + ctx->ws->buffer_unmap(qbuf->buf->cs_buf); return TRUE; } |