radeonsi: copy *8_SNORM bits exactly in resource_copy_region
authorMarek Olšák <marek.olsak@amd.com>
Thu, 30 Jul 2015 15:38:44 +0000 (17:38 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 31 Jul 2015 14:49:17 +0000 (16:49 +0200)
Disabling the FP16 mode didn't help.

If needed, we can use this trick for blits too, but not for scaled blits.

+ 4 piglits

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

index c89262389404127ede7ece75aa9d7af02fa29386..61ca2a82195905aa91d10463a1fc0beefea79f43 100644 (file)
@@ -522,7 +522,9 @@ void si_resource_copy_region(struct pipe_context *ctx,
                src_box = &sbox;
 
                src_force_level = src_level;
-       } else if (!util_blitter_is_copy_supported(sctx->blitter, dst, src)) {
+       } else if (!util_blitter_is_copy_supported(sctx->blitter, dst, src) ||
+                  /* also *8_SNORM has precision issues, use UNORM instead */
+                  util_format_is_snorm(src->format)) {
                if (util_format_is_subsampled_422(src->format)) {
                        src_templ.format = PIPE_FORMAT_R8G8B8A8_UINT;
                        dst_templ.format = PIPE_FORMAT_R8G8B8A8_UINT;