freedreno/a6xx: fix blitter nr_samples check
authorRob Clark <robdclark@gmail.com>
Tue, 29 Jan 2019 17:22:08 +0000 (12:22 -0500)
committerRob Clark <robdclark@gmail.com>
Tue, 29 Jan 2019 17:22:08 +0000 (12:22 -0500)
nr_samples for non-MSAA case could be either zero or one.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c

index 3e14e71933de13b288b40f7cfe3c62c6c604b266..460255f748aa5df70b82902039676072526f54cd 100644 (file)
@@ -113,7 +113,9 @@ can_do_blit(const struct pipe_blit_info *info)
        debug_assert(info->dst.box.height >= 0);
        debug_assert(info->dst.box.depth >= 0);
 
-       fail_if(info->dst.resource->nr_samples + info->src.resource->nr_samples > 2);
+       /* non-multisampled could either have nr_samples == 0 or == 1 */
+       fail_if(info->dst.resource->nr_samples > 1);
+       fail_if(info->src.resource->nr_samples > 1);
 
        fail_if(info->window_rectangle_include);