summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-03-03 22:53:58 +0100
committerMarek Olšák <[email protected]>2014-03-07 18:07:05 +0100
commitfcdf6fa86cb4dc530b8ab6881faa1da1aafa2b81 (patch)
treeb5b1b2a065ee0e80d34d7d74ec5987c265915afd /src/gallium/drivers/r600/r600_blit.c
parent8a08051e2a7227061300e344a4e41a1cdf2d6145 (diff)
r600g: fix blitting the last 2 mipmap levels for Evergreen
This fixes a lot of compressedteximage piglit tests. R600-R700 don't have this issue. Cc: [email protected]
Diffstat (limited to 'src/gallium/drivers/r600/r600_blit.c')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 770eb38e5d9..dc19b30bda2 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -679,6 +679,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
struct pipe_surface *dst_view, dst_templ;
struct pipe_sampler_view src_templ, *src_view;
unsigned dst_width, dst_height, src_width0, src_height0, src_widthFL, src_heightFL;
+ unsigned src_force_level = 0;
struct pipe_box sbox, dstbox;
/* Handle buffers first. */
@@ -737,6 +738,8 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
sbox.height = util_format_get_nblocksy(src->format, src_box->height);
sbox.depth = src_box->depth;
src_box = &sbox;
+
+ src_force_level = src_level;
} else if (!util_blitter_is_copy_supported(rctx->blitter, dst, src)) {
if (util_format_is_subsampled_2x1_32bpp(src->format)) {
@@ -789,7 +792,8 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
if (rctx->b.chip_class >= EVERGREEN) {
src_view = evergreen_create_sampler_view_custom(ctx, src, &src_templ,
- src_width0, src_height0);
+ src_width0, src_height0,
+ src_force_level);
} else {
src_view = r600_create_sampler_view_custom(ctx, src, &src_templ,
src_widthFL, src_heightFL);