Mesa (master): r600g: introduce a per-driver resource flag for transfers.
Dave Airlie
airlied at kemper.freedesktop.org
Thu Oct 21 03:42:34 UTC 2010
Module: Mesa
Branch: master
Commit: 92ed84d11560e226c87bf2758b1503e3075b3f82
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=92ed84d11560e226c87bf2758b1503e3075b3f82
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 21 13:36:01 2010 +1000
r600g: introduce a per-driver resource flag for transfers.
this is to be used to decide not to tile a surface being used for transfers.
---
src/gallium/drivers/r600/r600_resource.h | 3 +++
src/gallium/drivers/r600/r600_texture.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h
index 5d9fe8c..d152285 100644
--- a/src/gallium/drivers/r600/r600_resource.h
+++ b/src/gallium/drivers/r600/r600_resource.h
@@ -25,6 +25,9 @@
#include "util/u_transfer.h"
+/* flag to indicate a resource is to be used as a transfer so should not be tiled */
+#define R600_RESOURCE_FLAG_TRANSFER PIPE_RESOURCE_FLAG_DRV_PRIV
+
/* Texture transfer. */
struct r600_transfer {
/* Base class. */
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index c765c0c..b0e5cda 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -361,7 +361,7 @@ int r600_texture_depth_flush(struct pipe_context *ctx,
resource.nr_samples = 0;
resource.usage = PIPE_USAGE_DYNAMIC;
resource.bind = 0;
- resource.flags = 0;
+ resource.flags = R600_RESOURCE_FLAG_TRANSFER;
resource.bind |= PIPE_BIND_DEPTH_STENCIL;
@@ -412,7 +412,7 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
resource.nr_samples = 0;
resource.usage = PIPE_USAGE_DYNAMIC;
resource.bind = 0;
- resource.flags = 0;
+ resource.flags = R600_RESOURCE_FLAG_TRANSFER;
/* For texture reading, the temporary (detiled) texture is used as
* a render target when blitting from a tiled texture. */
if (usage & PIPE_TRANSFER_READ) {
More information about the mesa-commit
mailing list