0

media/gpu/vdatest: Pass through --use-gl and --ozone-platform flags

The --use-gl and --ozone-platform flags can affect the underlying
facilities used by the video decoder pipeline.

"--use-gl" can be used to specify a GL backend. One such use is to
request EGL instead of standard desktop GL on ARM platforms with
Mali GPUs combined with the open source driver stack. Desktop GL
on these platforms have some minor issues. Also, the V4L2 decoder
pipeline seems to expect EGL.

"--ozone-platform" can be used to specify an alternative backend instead
of the default X11 on Linux. One could try running the tests using the
DRM or headless backends.

These should be passed through to Chrome, instead of being unrecognized.

BUG=none
TEST=Run with --use-gl or --ozone-platform, should not error

Change-Id: I31c15f6a1bc2f9b2db84bc3d86cd162827f8a5e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3380109
Auto-Submit: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Miguel Casas-Sanchez <mcasas@chromium.org>
Commit-Queue: Miguel Casas-Sanchez <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076992}
This commit is contained in:
Chen-Yu Tsai
2022-11-29 18:54:40 +00:00
committed by Chromium LUCI CQ
parent 26c6841a96
commit 0cc7e91e58
4 changed files with 30 additions and 0 deletions

@ -101,6 +101,12 @@ Multiple command line arguments can be given to the command:
processor internally. This flag only works in
conjunction with --use_vd_vda.
Disabled by default.
--use-gl specify which GPU backend to use, possible values
include desktop (GLX), egl (GLES w/ ANGLE), and
swiftshader (software rendering)
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in

@ -83,6 +83,12 @@ Multiple command line arguments can be given to the command:
--output_limit limit the number of frames saved to disk.
--output_folder set the folder used to store frames, defaults to
"<testname>".
--use-gl specify which GPU backend to use, possible values
include desktop (GLX), egl (GLES w/ ANGLE), and
swiftshader (software rendering)
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in

@ -35,6 +35,7 @@ constexpr const char* usage_msg =
R"(usage: video_decode_accelerator_perf_tests
[-v=<level>] [--vmodule=<config>] [--output_folder]
([--use-legacy]|[--use_vd_vda]) [--linear_output]
[--use-gl=<backend>] [--ozone-platform=<platform>]
[--disable_vaapi_lock]
[--gtest_help] [--help]
[<video path>] [<video metadata path>]
@ -69,6 +70,12 @@ The following arguments are supported:
processor internally. This flag only works in
conjunction with --use_vd_vda.
Disabled by default.
--use-gl specify which GPU backend to use, possible values
include desktop (GLX), egl (GLES w/ ANGLE), and
swiftshader (software rendering)
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
@ -485,6 +492,8 @@ int main(int argc, char** argv) {
for (base::CommandLine::SwitchMap::const_iterator it = switches.begin();
it != switches.end(); ++it) {
if (it->first.find("gtest_") == 0 || // Handled by GoogleTest
it->first == "ozone-platform" || // Handled by Chrome
it->first == "use-gl" || // Handled by Chrome
it->first == "v" || it->first == "vmodule") { // Handled by Chrome
continue;
}

@ -43,6 +43,7 @@ constexpr const char* usage_msg =
[--output_frames=(all|corrupt)] [--output_format=(png|yuv)]
[--output_limit=<number>] [--output_folder=<folder>]
[--linear_output] ([--use-legacy]|[--use_vd_vda])
[--use-gl=<backend>] [--ozone-platform=<platform>]
[--disable_vaapi_lock]
[--gtest_help] [--help]
[<video path>] [<video metadata path>]
@ -85,6 +86,12 @@ The following arguments are supported:
--output_limit limit the number of frames saved to disk.
--output_folder set the folder used to store frames, defaults to
"<testname>".
--use-gl specify which GPU backend to use, possible values
include desktop (GLX), egl (GLES w/ ANGLE), and
swiftshader (software rendering)
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
@ -549,6 +556,8 @@ int main(int argc, char** argv) {
for (base::CommandLine::SwitchMap::const_iterator it = switches.begin();
it != switches.end(); ++it) {
if (it->first.find("gtest_") == 0 || // Handled by GoogleTest
it->first == "ozone-platform" || // Handled by Chrome
it->first == "use-gl" || // Handled by Chrome
it->first == "v" || it->first == "vmodule") { // Handled by Chrome
continue;
}