diff --git a/src/gallium/frontends/va/surface.c b/src/gallium/frontends/va/surface.c index 0ed135306bb..a4adf13246f 100644 --- a/src/gallium/frontends/va/surface.c +++ b/src/gallium/frontends/va/surface.c @@ -488,20 +488,6 @@ vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config_id, } } } - if (config->rt_format & VA_RT_FORMAT_YUV420_10 || - (config->rt_format & VA_RT_FORMAT_YUV420 && - config->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE)) { - attribs[i].type = VASurfaceAttribPixelFormat; - attribs[i].value.type = VAGenericValueTypeInteger; - attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; - attribs[i].value.value.i = VA_FOURCC_P010; - i++; - attribs[i].type = VASurfaceAttribPixelFormat; - attribs[i].value.type = VAGenericValueTypeInteger; - attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; - attribs[i].value.value.i = VA_FOURCC_P016; - i++; - } if (config->profile == PIPE_VIDEO_PROFILE_AV1_MAIN && config->entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM) { attribs[i].type = VASurfaceAttribPixelFormat; @@ -550,6 +536,21 @@ vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config_id, } } + if (config->rt_format & VA_RT_FORMAT_YUV420_10 || + (config->rt_format & VA_RT_FORMAT_YUV420 && + config->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE)) { + attribs[i].type = VASurfaceAttribPixelFormat; + attribs[i].value.type = VAGenericValueTypeInteger; + attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; + attribs[i].value.value.i = VA_FOURCC_P010; + i++; + attribs[i].type = VASurfaceAttribPixelFormat; + attribs[i].value.type = VAGenericValueTypeInteger; + attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE; + attribs[i].value.value.i = VA_FOURCC_P016; + i++; + } + attribs[i].type = VASurfaceAttribMemoryType; attribs[i].value.type = VAGenericValueTypeInteger; attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;