va: Use { 0 } initialize struct
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

../src/gallium/frontends/va/config.c(574): error C2059: syntax error: '}'

MSVC 2019 doesn't support for it yet

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36843>
This commit is contained in:
Yonggang Luo 2025-08-15 01:45:20 +08:00 committed by Marge Bot
parent 76c1243dc8
commit bdda1cf5ef

View file

@ -571,7 +571,7 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
case VAConfigAttribEncROI:
{
union pipe_enc_cap_roi roi_pipe_caps = {};
union pipe_enc_cap_roi roi_pipe_caps = { 0 };
roi_pipe_caps.value = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
PIPE_VIDEO_ENTRYPOINT_ENCODE,
PIPE_VIDEO_CAP_ENC_ROI);
@ -579,7 +579,7 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
value = VA_ATTRIB_NOT_SUPPORTED;
else
{
VAConfigAttribValEncROI roi_va_caps = {};
VAConfigAttribValEncROI roi_va_caps = { 0 };
roi_va_caps.bits.num_roi_regions = roi_pipe_caps.bits.num_roi_regions;
roi_va_caps.bits.roi_rc_priority_support = roi_pipe_caps.bits.roi_rc_priority_support;
roi_va_caps.bits.roi_rc_qp_delta_support = roi_pipe_caps.bits.roi_rc_qp_delta_support;