aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm/radeon_winsys.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-08-07 19:04:37 +0200
committerMarek Olšák <[email protected]>2011-08-16 09:15:11 +0200
commit1e3c81a068c4ae04cd1c6b18c687d5be69b7b8c4 (patch)
treecad1609cdb29df34a333e62d91fa76aac54b5b84 /src/gallium/winsys/radeon/drm/radeon_winsys.h
parent296b8990956fcbd7ce47902d7c108a5973db9397 (diff)
winsys/radeon: hook up the new DRM_RADEON_GEM_WAIT ioctl
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_winsys.h')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index bf5b144fe2c..90583e3ab8c 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -61,6 +61,12 @@ enum radeon_bo_domain { /* bitfield */
RADEON_DOMAIN_VRAM = 4
};
+enum radeon_bo_usage { /* bitfield */
+ RADEON_USAGE_READ = 2,
+ RADEON_USAGE_WRITE = 4,
+ RADEON_USAGE_READWRITE = RADEON_USAGE_READ | RADEON_USAGE_WRITE
+};
+
struct winsys_handle;
struct radeon_winsys_cs_handle; /* for write_reloc etc. */
@@ -162,8 +168,10 @@ struct radeon_winsys {
* Return TRUE if a buffer object is being used by the GPU.
*
* \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);
+ 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
@@ -171,8 +179,10 @@ struct radeon_winsys {
* 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.
*/
- void (*buffer_wait)(struct pb_buffer *buf);
+ void (*buffer_wait)(struct pb_buffer *buf, enum radeon_bo_usage usage);
/**
* Return tiling flags describing a memory layout of a buffer object.