frontends/va: Fix test_va_api VAAPIDisplayAttribs tests

Set max_display_attribs to 0 instead of 1 to match
va[Query,Get,Set]DisplayAttributes implementations [1].

If max_display_attribs is greater than 0 libva-utils tests check
vaQueryDisplayAttributes() accordingly [2].

[1] https://gitlab.freedesktop.org/mesa/mesa/-/blob/2de348cdb01e45/src/gallium/frontends/va/display.c#L32
[2] https://github.com/intel/libva-utils/blob/master/test/test_va_api_display_attribs.cpp#L90

Signed-off-by: Ed Baker <edward.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12941>
This commit is contained in:
Ed Baker
2021-09-02 16:03:24 -07:00
committed by Marge Bot
parent 9a7d6a110e
commit e99278fcf8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
ctx->max_attributes = 1;
ctx->max_image_formats = VL_VA_MAX_IMAGE_FORMATS;
ctx->max_subpic_formats = 1;
ctx->max_display_attributes = 1;
ctx->max_display_attributes = 0;
snprintf(drv->vendor_string, sizeof(drv->vendor_string),
"Mesa Gallium driver " PACKAGE_VERSION " for %s",
+1 -1
View File
@@ -35,7 +35,7 @@ vlVaQueryDisplayAttributes(VADriverContextP ctx, VADisplayAttribute *attr_list,
return VA_STATUS_ERROR_INVALID_CONTEXT;
if (!(attr_list && num_attributes))
return VA_STATUS_ERROR_UNKNOWN;
return VA_STATUS_ERROR_UNIMPLEMENTED;
*num_attributes = 0;