From 2558f75a516401f14fbf075e1919281883572de6 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 15 Mar 2013 14:29:24 -0400 Subject: [PATCH 1/2] r600g: fall back to blitter for compressed textures The hw can only access compressed textures as tiled not linear so we need to do format tricks to handle them properly. The blitter code already handles this so just fallback to the blitter for compressed textures. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60802 Note: this is a candidate for the 9.1 branch. Signed-off-by: Alex Deucher --- src/gallium/drivers/r600/evergreen_state.c | 9 +++++++++ src/gallium/drivers/r600/r600_state.c | 9 +++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 2bdefb0..4387c86 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -3674,6 +3674,15 @@ boolean evergreen_dma_blit(struct pipe_context *ctx, return FALSE; } + /* HW can only handle tiled compressed textures. + * Need to do format tricks in blitter code to handle them + * properly so bail here and let the blitter code handle it. + */ + if (src_mode != dst_mode) { + if (util_format_is_compressed(src->format)) + return FALSE; + } + if (src_mode == dst_mode) { uint64_t dst_offset, src_offset; /* simple dma blit would do NOTE code here assume : diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 846c159..8929d6e 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -3113,6 +3113,15 @@ boolean r600_dma_blit(struct pipe_context *ctx, return FALSE; } + /* HW can only handle tiled compressed textures. + * Need to do format tricks in blitter code to handle them + * properly so bail here and let the blitter code handle it. + */ + if (src_mode != dst_mode) { + if (util_format_is_compressed(src->format)) + return FALSE; + } + if (src_mode == dst_mode) { uint64_t dst_offset, src_offset, size; -- 1.7.7.5