Mesa (master): r600g: fix depth hw resource copies.

Dave Airlie airlied at kemper.freedesktop.org
Thu Feb 3 04:17:30 UTC 2011


Module: Mesa
Branch: master
Commit: 417cfa60b2fec89423be6ce51ab8b1f3063abb2a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=417cfa60b2fec89423be6ce51ab8b1f3063abb2a

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Feb  1 17:20:53 2011 +1000

r600g: fix depth hw resource copies.

With the previous fixes we can now enabled hw depth copies

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/r600_blit.c    |   11 ++---------
 src/gallium/drivers/r600/r600_texture.c |    9 ---------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index ca03281..c200dd7 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -208,15 +208,8 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
 				      unsigned src_level,
 				      const struct pipe_box *src_box)
 {
-	boolean is_depth;
-	/* there is something wrong with depth resource copies at the moment so avoid them for now */
-	is_depth = util_format_get_component_bits(src->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0;
-	if (is_depth)
-		util_resource_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
-					  src, src_level, src_box);
-	else
-		r600_hw_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
-				    src, src_level, src_box);
+	r600_hw_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
+			    src, src_level, src_box);
 }
 
 void r600_init_blit_functions(struct r600_pipe_context *rctx)
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 1d0e482..c773c4b 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -291,15 +291,6 @@ static boolean permit_hardware_blit(struct pipe_screen *screen,
 	else
 		bind = PIPE_BIND_RENDER_TARGET;
 
-	/* See r600_resource_copy_region: there is something wrong
-	 * with depth resource copies at the moment so avoid them for
-	 * now.
-	 */
-	if (util_format_get_component_bits(res->format,
-				UTIL_FORMAT_COLORSPACE_ZS,
-				0) != 0)
-		return FALSE;
-
 	if (!screen->is_format_supported(screen,
 				res->format,
 				res->target,




More information about the mesa-commit mailing list