diff options
author | Marek Olšák <[email protected]> | 2012-06-25 12:45:32 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-06-25 23:53:49 +0200 |
commit | da98bb6fc105e1a2f688a1713ca9e50f0ac8fbed (patch) | |
tree | 178addf092aabce8d0349fa69634317766f03f78 /src/gallium/drivers/r600/evergreen_state.c | |
parent | d1056541e239dfcee0ad6af2fd2d9fab37dbf025 (diff) |
r600g: split flushed depth texture creation and flushing
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index b618ca881ba..d6ed20d6cf9 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -988,8 +988,12 @@ static struct pipe_sampler_view *evergreen_create_sampler_view(struct pipe_conte } if (tmp->is_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; + } } endian = r600_colorformat_endian_swap(format); @@ -1310,8 +1314,9 @@ static void evergreen_cb(struct r600_context *rctx, struct r600_pipe_state *rsta rctx->have_depth_fb = TRUE; if (rtex->is_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); } /* XXX quite sure for dx10+ hw don't need any offset hacks */ |