freedreno/a6xx: Move blit check so as to restore comment
authorKristian H. Kristensen <hoegsberg@chromium.org>
Fri, 1 Feb 2019 23:28:00 +0000 (15:28 -0800)
committerKristian H. Kristensen <hoegsberg@chromium.org>
Mon, 11 Feb 2019 20:26:21 +0000 (12:26 -0800)
The explanation for the compressed format check is broken across two
comments:

/* We can blit if both or neither formats are compressed formats... */
/* ... but only if they're the same compression format. */

but the ok_format() checks were inserted between, breaking up the flow
of the sentence.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c

index d2e036fe74863b92abaa4700644ea7bae1928820..b107d4840504aafad6c8b6aa712bcfd5254c583d 100644 (file)
@@ -90,14 +90,14 @@ can_do_blit(const struct pipe_blit_info *info)
         */
        fail_if(info->dst.box.depth != info->src.box.depth);
 
-       /* We can blit if both or neither formats are compressed formats... */
-       fail_if(util_format_is_compressed(info->src.format) !=
-                       util_format_is_compressed(info->src.format));
-
        /* Fail if unsupported format: */
        fail_if(!ok_format(info->src.format));
        fail_if(!ok_format(info->dst.format));
 
+       /* We can blit if both or neither formats are compressed formats... */
+       fail_if(util_format_is_compressed(info->src.format) !=
+                       util_format_is_compressed(info->src.format));
+
        /* ... but only if they're the same compression format. */
        fail_if(util_format_is_compressed(info->src.format) &&
                        info->src.format != info->dst.format);