diff options
author | Marek Olšák <[email protected]> | 2012-07-18 00:17:46 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-07-18 00:21:53 +0200 |
commit | b242adbe5cfa165b252064a1ea36f802d8251ef1 (patch) | |
tree | 9438e162228ccdf0684c17a7fb9613e2a8dcb5d9 /src/gallium/drivers/r600/r600_texture.c | |
parent | 611dd529425281d73f1f0ad2000362d4a5525a25 (diff) |
r600g: remove needless wrapper r600_texture_depth_flush
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 5a6d755e109..3a5a912f63f 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -775,28 +775,6 @@ bool r600_init_flushed_depth_texture(struct pipe_context *ctx, return true; } -void r600_texture_depth_flush(struct pipe_context *ctx, - struct pipe_resource *texture, - struct r600_resource_texture **staging, - unsigned first_level, unsigned last_level, - unsigned first_layer, unsigned last_layer) -{ - struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture; - - if (!r600_init_flushed_depth_texture(ctx, texture, staging)) - return; - - if (staging) { - r600_blit_uncompress_depth(ctx, rtex, *staging, - first_level, last_level, - first_layer, last_layer); - } else { - r600_blit_uncompress_depth(ctx, rtex, NULL, - first_level, last_level, - first_layer, last_layer); - } -} - /* Needs adjustment for pixelformat: */ static INLINE unsigned u_box_volume( const struct pipe_box *box ) @@ -860,15 +838,17 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx, */ struct r600_resource_texture *staging_depth; - r600_texture_depth_flush(ctx, texture, &staging_depth, - level, level, - box->z, box->z + box->depth - 1); - if (!staging_depth) { + if (!r600_init_flushed_depth_texture(ctx, texture, &staging_depth)) { R600_ERR("failed to create temporary texture to hold untiled copy\n"); pipe_resource_reference(&trans->transfer.resource, NULL); FREE(trans); return NULL; } + + r600_blit_uncompress_depth(ctx, rtex, staging_depth, + level, level, + box->z, box->z + box->depth - 1); + trans->transfer.stride = staging_depth->pitch_in_bytes[level]; trans->offset = r600_texture_get_offset(staging_depth, level, box->z); trans->staging = (struct r600_resource*)staging_depth; |