aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_transfer.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-05-13 20:32:08 +0200
committerMarek Olšák <[email protected]>2010-05-13 21:11:20 +0200
commit60a053510155c119a6927bf7114e597066f8c50a (patch)
treea58f37b4c469f26cecf78fbb95a85aa99d408a92 /src/gallium/drivers/r300/r300_transfer.c
parent8b3bf9c299b4e7f68d4207b8d4ebb00d79ebf6d8 (diff)
r300g: fix texture transfers
The regression has first shown up after this state tracker change: b0427bedde80e3189524651a327235bdfddbc613. FDO bug #28082.
Diffstat (limited to 'src/gallium/drivers/r300/r300_transfer.c')
-rw-r--r--src/gallium/drivers/r300/r300_transfer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
index 0dae9ef98b7..14a9bfd8650 100644
--- a/src/gallium/drivers/r300/r300_transfer.c
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -127,6 +127,12 @@ r300_texture_get_transfer(struct pipe_context *ctx,
struct r300_transfer *trans;
struct pipe_resource base;
+ /* XXX Why aren't flushes taken care of by winsys automatically?
+ * Winsys seems to sometimes return a cached buffer instead of
+ * a mapped hardware buffer if this flush is commented out. */
+ if (ctx->is_resource_referenced(ctx, texture, sr.face, sr.level))
+ ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+
trans = CALLOC_STRUCT(r300_transfer);
if (trans) {
/* Initialize the transfer object. */