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:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user