diff options
author | Marek Olšák <[email protected]> | 2013-01-15 19:04:13 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2013-01-21 15:42:28 +0100 |
commit | bfb405ceee3843ab7fa9ec03919939ff69e2a373 (patch) | |
tree | ef8e43184a3b5b7a2fa093c66c9e33a8ffe3a270 /src/gallium/drivers/radeonsi/si_state.c | |
parent | f0ffbbc9fff190f014709bb5c5067bf5faae181e (diff) |
radeonsi: Assorted depth/stencil changes ported from r600g.
[ Squashed port of the following r600g commits: - Michel Dänzer ]
commit c1e8c845ea9c6f843cc5bba5974668c007799bbc
Author: Marek Olšák <[email protected]>
Date: Sat Jul 7 19:10:00 2012 +0200
r600g: inline r600_hw_copy_region
commit 4891c5dc64ccd8cf2bf8a8550ae23e1a61806a7d
Author: Marek Olšák <[email protected]>
Date: Mon Jun 25 22:53:21 2012 +0200
r600g: inline r600_blit_push_depth and use resource_copy_region
We are going to have a separate resource for depth texturing and transfers
and this is just a transfer thing.
commit da98bb6fc105e1a2f688a1713ca9e50f0ac8fbed
Author: Marek Olšák <[email protected]>
Date: Mon Jun 25 12:45:32 2012 +0200
r600g: split flushed depth texture creation and flushing
Signed-off-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index ee353edb816..fe3efb6adc9 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1585,8 +1585,9 @@ static void si_cb(struct r600_context *rctx, struct si_pm4_state *pm4, rctx->have_depth_fb = TRUE; if (rtex->depth && !rtex->is_flushing_texture) { - r600_texture_depth_flush(&rctx->context, state->cbufs[cb]->texture, TRUE); + r600_init_flushed_depth_texture(&rctx->context, state->cbufs[cb]->texture); rtex = rtex->flushed_depth_texture; + assert(rtex); } offset = rtex->surface.level[level].offset; @@ -2083,8 +2084,12 @@ static struct pipe_sampler_view *si_create_sampler_view(struct pipe_context *ctx } if (tmp->depth && !tmp->is_flushing_texture) { - r600_texture_depth_flush(ctx, texture, TRUE); + r600_init_flushed_depth_texture(ctx, texture); tmp = tmp->flushed_depth_texture; + if (!tmp) { + FREE(view); + return NULL; + } texture = &tmp->resource.b.b; } |