summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_transfer.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-01-02 01:13:15 +0100
committerMarek Olšák <[email protected]>2012-01-05 18:29:11 +0100
commit0950086376b1c8b7fb89eda81ed7f2f06dee58bc (patch)
tree0ca11705eb95036df1590d2fda13239f684d6dee /src/gallium/drivers/r300/r300_transfer.c
parent7cd1c62b6be88072e3d937b67c499592490927f1 (diff)
gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY
Please see the diff for further info. This paves the way for moving user buffer uploads out of drivers and should allow to clean up the mess in u_upload_mgr in the meantime. For now only allowed for buffers on r300 and r600. Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300/r300_transfer.c')
-rw-r--r--src/gallium/drivers/r300/r300_transfer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
index afdd530d15d..91e861a4a73 100644
--- a/src/gallium/drivers/r300/r300_transfer.c
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -89,6 +89,10 @@ r300_texture_get_transfer(struct pipe_context *ctx,
struct pipe_resource base;
boolean referenced_cs, referenced_hw;
+ if (usage & (PIPE_TRANSFER_MAP_DIRECTLY | PIPE_TRANSFER_MAP_PERMANENTLY)) {
+ return NULL;
+ }
+
referenced_cs =
r300->rws->cs_is_buffer_referenced(r300->cs, tex->cs_buf);
if (referenced_cs) {