st/va: remove unneeded code
authorThong Thai <thong.thai@amd.com>
Fri, 28 Feb 2020 15:15:17 +0000 (10:15 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Feb 2020 20:16:38 +0000 (20:16 +0000)
No need to explicitly set the 10-bit buffer format as the correct
buffer format will be allocated later

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998>

src/gallium/state_trackers/va/surface.c

index 495a68b492cbc61d836b0c8839114a6ec1a321a1..bfad93f8f3d5269bf68d4798cfcaa5587d586bb2 100644 (file)
@@ -754,28 +754,18 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format,
 
    memset(&templat, 0, sizeof(templat));
 
-   if (format == VA_RT_FORMAT_YUV420_10BPP)
-   {
-      templat.buffer_format = PIPE_FORMAT_P010;
-      templat.interlaced = false;
-   }
-   else
-   {
-      templat.buffer_format = pscreen->get_video_param(
-         pscreen,
-         PIPE_VIDEO_PROFILE_UNKNOWN,
-         PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
-         PIPE_VIDEO_CAP_PREFERED_FORMAT
-      );
-      templat.interlaced = pscreen->get_video_param(
-         pscreen,
-         PIPE_VIDEO_PROFILE_UNKNOWN,
-         PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
-         PIPE_VIDEO_CAP_PREFERS_INTERLACED
-      );
-   }
-   
-
+   templat.buffer_format = pscreen->get_video_param(
+      pscreen,
+      PIPE_VIDEO_PROFILE_UNKNOWN,
+      PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+      PIPE_VIDEO_CAP_PREFERED_FORMAT
+   );
+   templat.interlaced = pscreen->get_video_param(
+      pscreen,
+      PIPE_VIDEO_PROFILE_UNKNOWN,
+      PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+      PIPE_VIDEO_CAP_PREFERS_INTERLACED
+   );
 
    if (expected_fourcc) {
       enum pipe_format expected_format = VaFourccToPipeFormat(expected_fourcc);