From 6067a30838535c838262a9229b400afe4d92c184 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 8 Oct 2013 21:26:34 +0200 Subject: winsys/radeon: add the implementation of fences from r300g --- src/gallium/winsys/radeon/drm/radeon_winsys.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/gallium/winsys/radeon/drm/radeon_winsys.h') diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h index 581cd841cd8..c0003711bee 100644 --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h @@ -484,6 +484,29 @@ struct radeon_winsys { */ void (*cs_sync_flush)(struct radeon_winsys_cs *cs); + /** + * Return a fence associated with the CS. The fence will be signalled + * once the CS is flushed and all commands in the CS are completed + * by the GPU. + */ + struct pipe_fence_handle *(*cs_create_fence)(struct radeon_winsys_cs *cs); + + /** + * Wait for the fence and return true if the fence has been signalled. + * The timeout of 0 will only return the status. + * The timeout of PIPE_TIMEOUT_INFINITE will always wait until the fence + * is signalled. + */ + bool (*fence_wait)(struct radeon_winsys *ws, + struct pipe_fence_handle *fence, + uint64_t timeout); + + /** + * Reference counting for fences. + */ + void (*fence_reference)(struct pipe_fence_handle **dst, + struct pipe_fence_handle *src); + /** * Initialize surface * -- cgit v1.2.3