diff options
author | José Fonseca <[email protected]> | 2010-03-13 16:13:26 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-03-13 16:13:26 +0000 |
commit | bf40c346637325862d6d9cdbc9838c5726abc0c0 (patch) | |
tree | 319879161ef4693a983a05c6381bf4fd41fc801e /src/gallium/drivers/llvmpipe/lp_texture.c | |
parent | 3abc7b985ce0787c5103d1a86bd0ba07b127a82f (diff) |
llvmpipe: Ensure the context is flushed before modifying textures.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_texture.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index f3f0cd7b472..9a85a42897d 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -371,6 +371,16 @@ llvmpipe_transfer_map( struct pipe_context *pipe, lpt = llvmpipe_texture(transfer->texture); format = lpt->base.format; + /* + * Transfers, like other pipe operations, must happen in order, so flush the + * context if necessary. + */ + llvmpipe_flush_texture(pipe, + transfer->texture, transfer->face, transfer->level, + 0, /* flush_flags */ + !(transfer->usage & PIPE_TRANSFER_WRITE), /* read_only */ + TRUE, /* cpu_access */ + FALSE); /* do_not_flush */ map = llvmpipe_texture_map(transfer->texture, transfer->face, transfer->level, transfer->zslice); |