From: Marek Olšák Date: Mon, 25 Jun 2012 20:53:21 +0000 (+0200) Subject: r600g: inline r600_blit_push_depth and use resource_copy_region X-Git-Tag: mesa-9.0~1445 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4891c5dc64ccd8cf2bf8a8550ae23e1a61806a7d;p=platform%2Fupstream%2Fmesa.git 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. --- diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index 6437f31..031cd39 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -384,19 +384,3 @@ void r600_init_blit_functions(struct r600_context *rctx) rctx->context.clear_depth_stencil = r600_clear_depth_stencil; rctx->context.resource_copy_region = r600_resource_copy_region; } - -void r600_blit_push_depth(struct pipe_context *ctx, struct r600_resource_texture *texture) -{ - struct pipe_box sbox; - - sbox.x = sbox.y = sbox.z = 0; - sbox.width = texture->resource.b.b.width0; - sbox.height = texture->resource.b.b.height0; - /* XXX that might be wrong */ - sbox.depth = 1; - - r600_hw_copy_region(ctx, (struct pipe_resource *)texture, 0, - 0, 0, 0, - (struct pipe_resource *)texture->flushed_depth_texture, 0, - &sbox); -} diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index b5eff34..9806e5b 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -405,7 +405,6 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen, /* r600_blit.c */ void r600_init_blit_functions(struct r600_context *rctx); void r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture); -void r600_blit_push_depth(struct pipe_context *ctx, struct r600_resource_texture *texture); void r600_flush_depth_textures(struct r600_context *rctx); /* r600_buffer.c */ diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 10f47ec..2368126 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -906,7 +906,17 @@ void r600_texture_transfer_destroy(struct pipe_context *ctx, if (rtex->is_depth && !rtex->is_flushing_texture) { if ((transfer->usage & PIPE_TRANSFER_WRITE) && rtex->flushed_depth_texture) { - r600_blit_push_depth(ctx, rtex); + struct pipe_box sbox; + + sbox.x = sbox.y = sbox.z = 0; + sbox.width = texture->width0; + sbox.height = texture->height0; + /* XXX that might be wrong */ + sbox.depth = 1; + + ctx->resource_copy_region(ctx, texture, 0, 0, 0, 0, + &rtex->flushed_depth_texture->resource.b.b, 0, + &sbox); } }