diff options
author | Marek Olšák <[email protected]> | 2011-08-06 05:15:30 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-08-06 05:45:19 +0200 |
commit | 1554e69e00566bc7255b82f5ea93b1f02f1a5bb3 (patch) | |
tree | bfb570a9116b59661e21c171ec17cf3c62d9a9d9 /src/gallium/winsys/radeon | |
parent | db726b048e8858af226dbd0f0fda72d0be01394e (diff) |
winsys/radeon: disable use of the buffer busy-for-write flag
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 2eb9d134407..609a9065db8 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -192,6 +192,17 @@ static void *radeon_bo_map_internal(struct pb_buffer *_buf, if (radeon_bo_is_referenced_by_cs_for_write(cs, bo)) { cs->flush_cs(cs->flush_data, 0); radeon_bo_wait((struct pb_buffer*)bo); + } else { + /* XXX We could check whether the buffer is busy for write here. */ + radeon_bo_wait((struct pb_buffer*)bo); + } +#if 0 + /* XXX This per-winsys busy-for-write tracking sucks. + * What if some other process wrote something, e.g. using + * DRI2CopyRegion? We wouldn't get the busy_for_write flag + * set, skipping bo_wait. + * We need to move the is-busy-for-write query into the kernel. + */ } else if (bo->busy_for_write) { /* Update the busy_for_write field (done by radeon_bo_is_busy) * and wait if needed. */ @@ -199,6 +210,7 @@ static void *radeon_bo_map_internal(struct pb_buffer *_buf, radeon_bo_wait((struct pb_buffer*)bo); } } +#endif } else { /* Mapping for write. */ if (radeon_bo_is_referenced_by_cs(cs, bo)) { |