diff options
author | Dave Airlie <[email protected]> | 2009-12-18 09:32:04 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-12-18 10:24:50 +1000 |
commit | 5f59e79f3a9f273c683304117802bb216171c257 (patch) | |
tree | 1697474ff912aba99fb6173042f0c89da4af7445 | |
parent | 294bd53d4b6b15a6890599c46f14b205a3c738bf (diff) |
r300g: store own copy of flush_cb and flush data.
don't go sneaking around inside the libdrm copy.
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_buffer.c | 4 | ||||
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_buffer.h | 4 | ||||
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_r300.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c index 76acc99ad73..cb8d2c2cf24 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c @@ -135,7 +135,7 @@ static void radeon_buffer_del(struct pipe_buffer *buffer) struct radeon_winsys_priv *priv = radeon_buffer->ws->priv; if (radeon_bo_is_referenced_by_cs(radeon_buffer->bo, priv->cs)) { - priv->cs->space_flush_fn(priv->cs->space_flush_data); + priv->flush_cb(priv->flush_data); } radeon_bo_unref(radeon_buffer->bo); @@ -152,7 +152,7 @@ static void *radeon_buffer_map(struct pipe_winsys *ws, int write = 0; if (radeon_bo_is_referenced_by_cs(radeon_buffer->bo, priv->cs)) { - priv->cs->space_flush_fn(priv->cs->space_flush_data); + priv->flush_cb(priv->flush_data); } if (flags & PIPE_BUFFER_USAGE_DONTBLOCK) { diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.h b/src/gallium/winsys/drm/radeon/core/radeon_buffer.h index 1e91e18927a..950a1d66c3d 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.h +++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.h @@ -69,6 +69,10 @@ struct radeon_winsys_priv { /* Current CS. */ struct radeon_cs* cs; + + /* Flush CB */ + void (*flush_cb)(void *); + void *flush_data; }; struct radeon_winsys* radeon_pipe_winsys(int fb); diff --git a/src/gallium/winsys/drm/radeon/core/radeon_r300.c b/src/gallium/winsys/drm/radeon/core/radeon_r300.c index ba0596c30dc..0875ee41cbf 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_r300.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_r300.c @@ -26,6 +26,8 @@ static void radeon_set_flush_cb(struct radeon_winsys *winsys, void (*flush_cb)(void *), void *data) { + winsys->priv->flush_cb = flush_cb; + winsys->priv->flush_data = data; radeon_cs_space_set_flush(winsys->priv->cs, flush_cb, data); } |