aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorThong Thai <[email protected]>2020-02-28 10:15:17 -0500
committerMarge Bot <[email protected]>2020-02-28 20:16:38 +0000
commit09323634898ab3efc0150dc7d756bf36b1b89b76 (patch)
treead884ee0cb6acfcc097d00dd974ed58f0e18b706 /src/gallium
parent8cb9f79413105a8eea98eaf70725cc1e28ae041c (diff)
st/va: remove unneeded code
No need to explicitly set the 10-bit buffer format as the correct buffer format will be allocated later Signed-off-by: Thong Thai <[email protected]> Reviewed-by: Leo Liu <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/va/surface.c34
1 files changed, 12 insertions, 22 deletions
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
index 495a68b492c..bfad93f8f3d 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -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);