summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/r600_resource.h
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2013-01-15 19:36:32 +0100
committerMichel Dänzer <[email protected]>2013-01-21 15:42:28 +0100
commitbc398f908f8765edee48150dc7e3f24874bb03d9 (patch)
tree9b46d1fee323fd68fe3d2e3ea4d22999f1470acc /src/gallium/drivers/radeonsi/r600_resource.h
parentbfb405ceee3843ab7fa9ec03919939ff69e2a373 (diff)
radeonsi: improve flushed depth texture handling
Use r600_resource_texture::flished_depth_texture for GPU access, and allocate it in the VRAM. For transfers we'll allocate texture in the GTT and store it in the r600_transfer::staging. Improves performance when flushed depth texture is frequently used by the GPU, e.g. in Lightsmark [ Ported from r600g commit 37708479608af877986b76302a9c92611d1e23d0 ] Signed-off-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/r600_resource.h')
-rw-r--r--src/gallium/drivers/radeonsi/r600_resource.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_resource.h b/src/gallium/drivers/radeonsi/r600_resource.h
index 4cacf6274c7..8d809352e6d 100644
--- a/src/gallium/drivers/radeonsi/r600_resource.h
+++ b/src/gallium/drivers/radeonsi/r600_resource.h
@@ -36,7 +36,7 @@ struct r600_transfer {
/* Buffer transfer. */
struct pipe_transfer *buffer_transfer;
unsigned offset;
- struct pipe_resource *staging_texture;
+ struct pipe_resource *staging;
};
struct r600_resource_texture {
@@ -48,7 +48,7 @@ struct r600_resource_texture {
enum pipe_format real_format;
unsigned pitch_override;
- unsigned depth;
+ unsigned is_depth;
unsigned dirty_db;
struct r600_resource_texture *flushed_depth_texture;
boolean is_flushing_texture;
@@ -69,9 +69,11 @@ struct pipe_resource *si_texture_from_handle(struct pipe_screen *screen,
struct winsys_handle *whandle);
void r600_init_flushed_depth_texture(struct pipe_context *ctx,
- struct pipe_resource *texture);
+ struct pipe_resource *texture,
+ struct r600_resource_texture **staging);
void r600_texture_depth_flush(struct pipe_context *ctx,
- struct pipe_resource *texture);
+ struct pipe_resource *texture,
+ struct r600_resource_texture **staging);
struct r600_context;