diff options
author | Marek Olšák <[email protected]> | 2015-08-06 23:41:38 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-08-07 00:06:13 +0200 |
commit | 592ce6e2d1b2c804a95cb00c06e7bbb9d83f554b (patch) | |
tree | 3cbaa5e483469ed31a8ed69d50498b3567f87689 /src/gallium/drivers/r300 | |
parent | 8118d3719aee5fdf313c33dbf3256dd78ff46bea (diff) |
gallium/radeon: unify buffer_wait and buffer_is_busy in the winsys interface
The timeout parameter covers both cases.
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_query.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_transfer.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 6a4cd71b169..4dd8156f616 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -146,10 +146,11 @@ static boolean r300_get_query_result(struct pipe_context* pipe, if (q->type == PIPE_QUERY_GPU_FINISHED) { if (wait) { - r300->rws->buffer_wait(q->buf, RADEON_USAGE_READWRITE); + r300->rws->buffer_wait(q->buf, PIPE_TIMEOUT_INFINITE, + RADEON_USAGE_READWRITE); vresult->b = TRUE; } else { - vresult->b = !r300->rws->buffer_is_busy(q->buf, RADEON_USAGE_READWRITE); + vresult->b = r300->rws->buffer_wait(q->buf, 0, RADEON_USAGE_READWRITE); } return vresult->b; } diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index de557b57776..6451a2c8df2 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -96,7 +96,7 @@ r300_buffer_transfer_map( struct pipe_context *context, /* Check if mapping this buffer would cause waiting for the GPU. */ if (r300->rws->cs_is_buffer_referenced(r300->cs, rbuf->cs_buf, RADEON_USAGE_READWRITE) || - r300->rws->buffer_is_busy(rbuf->buf, RADEON_USAGE_READWRITE)) { + !r300->rws->buffer_wait(rbuf->buf, 0, RADEON_USAGE_READWRITE)) { unsigned i; struct pb_buffer *new_buf; diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c index 4fa360a042d..44303792f51 100644 --- a/src/gallium/drivers/r300/r300_transfer.c +++ b/src/gallium/drivers/r300/r300_transfer.c @@ -120,7 +120,7 @@ r300_texture_transfer_map(struct pipe_context *ctx, referenced_hw = TRUE; } else { referenced_hw = - r300->rws->buffer_is_busy(tex->buf, RADEON_USAGE_READWRITE); + !r300->rws->buffer_wait(tex->buf, 0, RADEON_USAGE_READWRITE); } trans = CALLOC_STRUCT(r300_transfer); |