summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2012-07-11 02:19:51 +0400
committerVadim Girlin <[email protected]>2012-07-11 02:39:59 +0400
commit37708479608af877986b76302a9c92611d1e23d0 (patch)
treef66db9d3760b8402df29044b59e70f7e59c7b451 /src/gallium/drivers/r600/evergreen_state.c
parent860d5bdf984730f69cd19b4f7145f3c84b57d33d (diff)
r600g: improve flushed depth texture handling v2
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 (~30%) Signed-off-by: Vadim Girlin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index bbdc5868a80..60825bc7244 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -990,7 +990,7 @@ static struct pipe_sampler_view *evergreen_create_sampler_view(struct pipe_conte
}
if (tmp->is_depth && !tmp->is_flushing_texture) {
- r600_init_flushed_depth_texture(ctx, texture);
+ r600_init_flushed_depth_texture(ctx, texture, NULL);
tmp = tmp->flushed_depth_texture;
if (!tmp) {
FREE(view);
@@ -1318,7 +1318,8 @@ void evergreen_cb(struct r600_context *rctx, struct r600_pipe_state *rstate,
rctx->have_depth_fb = TRUE;
if (rtex->is_depth && !rtex->is_flushing_texture) {
- r600_init_flushed_depth_texture(&rctx->context, state->cbufs[cb]->texture);
+ r600_init_flushed_depth_texture(&rctx->context,
+ state->cbufs[cb]->texture, NULL);
rtex = rtex->flushed_depth_texture;
assert(rtex);
}