frontends/va: Don't use EFC with scaling or filtering enabled
authorDavid Rosca <nowrep@gmail.com>
Sat, 15 Jul 2023 14:30:04 +0000 (16:30 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 18 Jul 2023 20:09:42 +0000 (20:09 +0000)
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24170>

src/gallium/frontends/va/postproc.c

index ccb290f..a0f595a 100644 (file)
@@ -421,7 +421,13 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
 
    pscreen = drv->vscreen->pscreen;
 
-   if (can_convert_with_efc(src_surface, dst_surface) &&
+   src_region = vlVaRegionDefault(param->surface_region, src_surface, &def_src_region);
+   dst_region = vlVaRegionDefault(param->output_region, dst_surface, &def_dst_region);
+
+   if (!param->num_filters &&
+       src_region->width == dst_region->width &&
+       src_region->height == dst_region->height &&
+       can_convert_with_efc(src_surface, dst_surface) &&
        pscreen->get_video_param(pscreen,
                                 PIPE_VIDEO_PROFILE_UNKNOWN,
                                 PIPE_VIDEO_ENTRYPOINT_ENCODE,
@@ -505,9 +511,6 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
       }
    }
 
-   src_region = vlVaRegionDefault(param->surface_region, src_surface, &def_src_region);
-   dst_region = vlVaRegionDefault(param->output_region, dst_surface, &def_dst_region);
-
    /* If the driver supports video engine post proc, attempt to do that
     * if it fails, fallback to the other existing implementations below
     */