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/radeon/radeon_winsys.h | |
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/radeon/radeon_winsys.h')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index c79a0823ad0..ea1e1970157 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -398,24 +398,15 @@ struct radeon_winsys { void (*buffer_unmap)(struct radeon_winsys_cs_handle *buf); /** - * Return TRUE if a buffer object is being used by the GPU. + * Wait for the buffer and return true if the buffer is not used + * by the device. * - * \param buf A winsys buffer object. - * \param usage Only check whether the buffer is busy for the given usage. - */ - boolean (*buffer_is_busy)(struct pb_buffer *buf, - enum radeon_bo_usage usage); - - /** - * Wait for a buffer object until it is not used by a GPU. This is - * equivalent to a fence placed after the last command using the buffer, - * and synchronizing to the fence. - * - * \param buf A winsys buffer object to wait for. - * \param usage Only wait until the buffer is idle for the given usage, - * but may still be busy for some other usage. + * The timeout of 0 will only return the status. + * The timeout of PIPE_TIMEOUT_INFINITE will always wait until the buffer + * is idle. */ - void (*buffer_wait)(struct pb_buffer *buf, enum radeon_bo_usage usage); + bool (*buffer_wait)(struct pb_buffer *buf, uint64_t timeout, + enum radeon_bo_usage usage); /** * Return tiling flags describing a memory layout of a buffer object. |