mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
r300g: store own copy of flush_cb and flush data.
don't go sneaking around inside the libdrm copy.
This commit is contained in:
parent
294bd53d4b
commit
5f59e79f3a
3 changed files with 8 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue