radeonsi: allow copying between compatible compressed and uncompressed formats
authorMarek Olšák <marek.olsak@amd.com>
Sun, 23 Aug 2015 23:08:48 +0000 (01:08 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 28 Oct 2015 10:52:17 +0000 (11:52 +0100)
which is where a block in src maps to a pixel in dst and vice versa.
e.g. DXT1 <-> R32G32_UINT
     DXT5 <-> R32G32B32A32_UINT

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_blit.c

index 302b75ccce491ca6c9082347fa03273dc7ff3898..fce014a1e6b8668e701259a2f99b9872def6accc 100644 (file)
@@ -507,7 +507,7 @@ void si_resource_copy_region(struct pipe_context *ctx,
        util_blitter_default_dst_texture(&dst_templ, dst, dst_level, dstz);
        util_blitter_default_src_texture(&src_templ, src, src_level);
 
-       if (util_format_is_compressed(src->format) &&
+       if (util_format_is_compressed(src->format) ||
            util_format_is_compressed(dst->format)) {
                unsigned blocksize = util_format_get_blocksize(src->format);