summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-06-29 23:34:36 +0200
committerMarek Olšák <[email protected]>2010-06-30 00:03:04 +0200
commit6a34287bb5147a3213e94d88c97db4ec403509ae (patch)
tree50e9a21abc519ceb8c017e0fddc6702bdc669efb /src/gallium/winsys
parent3d6101245b2726721a26931e0491c61286ca29c6 (diff)
r300g: move one flush from winsys to the context
This flush happens when changing the tiling flags, and it should really be done in the context. I hope this fixes FDO bug #28630.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_buffer.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
index a4b6cff33d1..cb4ec32feae 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
@@ -22,8 +22,6 @@ struct radeon_drm_buffer {
boolean flinked;
uint32_t flink;
- uint32_t tileflags;
- uint32_t pitch;
struct radeon_drm_buffer *next, *prev;
};
@@ -297,9 +295,6 @@ void radeon_drm_bufmgr_get_tiling(struct pb_buffer *_buf,
radeon_bo_get_tiling(buf->bo, &flags, &pitch);
- buf->tileflags = flags;
- buf->pitch = pitch;
-
*microtiled = R300_BUFFER_LINEAR;
*macrotiled = R300_BUFFER_LINEAR;
if (flags & RADEON_BO_FLAGS_MICRO_TILE)
@@ -326,15 +321,7 @@ void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf,
if (macrotiled == R300_BUFFER_TILED)
flags |= RADEON_BO_FLAGS_MACRO_TILE;
- if (flags != buf->tileflags || pitch != buf->pitch) {
- /* Tiling determines how DRM treats the buffer data.
- * We must flush CS when changing it if the buffer is referenced. */
- if (radeon_bo_is_referenced_by_cs(buf->bo, buf->mgr->rws->cs)) {
- buf->mgr->rws->flush_cb(buf->mgr->rws->flush_data);
- }
-
- radeon_bo_set_tiling(buf->bo, flags, pitch);
- }
+ radeon_bo_set_tiling(buf->bo, flags, pitch);
}
static uint32_t gem_domain(enum r300_buffer_domain dom)