Commit 40eb3bd7 authored by kylechar's avatar kylechar Committed by Commit Bot

Fix GPU integration test tags

Both [no-]skia-renderer and [no-]use-vulkan tags in GPU integration
tests were based on the command line. Code assumed that if there was
nothing on the command line then the feature was disabled which was
incorrect.

Change the tags to be based on if the feature is enabled or not. Also
change use-vulkan to just be vulkan for brevity.

Bug: 1069551, 1084569
Change-Id: I33fdbfb4d8078127f066f4a86a267477e4e9e020
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2209348Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770579}
parent dd4aa0b2
......@@ -133,24 +133,22 @@ def GetCommandDecoder(gpu_info):
return 'no_passthrough'
# Used to parse additional options sent to the browser instance via
# '--extra-browser-args', looking for '--enable-features=UseSkiaRenderer' which
# may be merged with additional feature flags.
def GetSkiaRenderer(extra_browser_args):
if extra_browser_args:
for o in extra_browser_args:
if o.startswith('--enable-features') and "UseSkiaRenderer" in o:
return 'skia-renderer'
if o.startswith('--disable-features') and "UseSkiaRenderer" in o:
return 'no-skia-renderer'
if "--disable-vulkan-fallback-to-gl-for-testing" in o:
return 'skia-renderer'
# TODO(kylechar): The feature is enabled/disabled differently depending on
# platform and official build status. Find out if SkiaRenderer is enabled
# through GPU info instead.
# Used to check GPU feature status to see if SkiaRenderer is enabled.
def GetSkiaRenderer(gpu_feature_status):
if gpu_feature_status and 'skia_renderer' in gpu_feature_status:
if gpu_feature_status['skia_renderer'] == 'enabled_on':
return 'skia-renderer'
return 'no-skia-renderer'
# Used to check GPU feature status to see if Vulkan is enabled.
def GetVulkan(gpu_feature_status):
if gpu_feature_status and 'vulkan' in gpu_feature_status:
if gpu_feature_status['vulkan'] == 'enabled_on':
return 'vulkan'
return 'no-vulkan'
# Used to parse additional options sent to the browser instance via
# '--extra-browser-args', looking for '--use-gl='.
def GetGL(extra_browser_args):
......@@ -161,19 +159,10 @@ def GetGL(extra_browser_args):
return 'no-use-gl'
# Used to parse additional options sent to the browser instance via
# '--extra-browser-args', looking for '--use-vulkan='.
def GetVulkan(extra_browser_args):
if extra_browser_args:
for o in extra_browser_args:
if "--use-vulkan=" in o:
return 'use-vulkan'
return 'no-use-vulkan'
# Used to parse additional options sent to the browser instance via
# '--extra-browser-args', looking for '--enable-features=SkiaDawn' which
# may be merged with additional feature flags.
# TODO(sgilhuly): Use GPU feature status for Dawn instead of command line.
def GetSkiaDawn(extra_browser_args):
if extra_browser_args:
for o in extra_browser_args:
......
......@@ -445,16 +445,19 @@ class GpuIntegrationTest(
gpu_tags.extend([gpu_vendor, gpu_device_tag])
# all spaces and underscores in the tag will be replaced by dashes
tags.extend([re.sub('[ _]', '-', tag) for tag in gpu_tags])
# Add tags based on GPU feature status.
skia_renderer = gpu_helper.GetSkiaRenderer(gpu_info.feature_status)
tags.append(skia_renderer)
use_vulkan = gpu_helper.GetVulkan(gpu_info.feature_status)
tags.append(use_vulkan)
# If additional options have been set via '--extra-browser-args' check for
# those which map to expectation tags. The '_browser_backend' attribute may
# not exist in unit tests.
if hasattr(browser, 'startup_args'):
skia_renderer = gpu_helper.GetSkiaRenderer(browser.startup_args)
tags.append(skia_renderer)
use_gl = gpu_helper.GetGL(browser.startup_args)
tags.append(use_gl)
use_vulkan = gpu_helper.GetVulkan(browser.startup_args)
tags.append(use_vulkan)
use_skia_dawn = gpu_helper.GetSkiaDawn(browser.startup_args)
tags.append(use_skia_dawn)
return tags
......
......@@ -190,7 +190,8 @@ class GpuIntegrationTestUnittest(unittest.TestCase):
_GetTagsToTest(browser),
set([
'win', 'win10', 'release', 'nvidia', 'nvidia-0x1cb3', 'd3d9',
'no-passthrough', 'no-swiftshader-gl'
'no-passthrough', 'no-swiftshader-gl', 'no-vulkan',
'no-skia-renderer'
]))
def testGenerateVendorTagUsingVendorString(self):
......@@ -206,7 +207,7 @@ class GpuIntegrationTestUnittest(unittest.TestCase):
set([
'mac', 'mojave', 'release', 'imagination',
'imagination-PowerVR-SGX-554', 'opengles', 'passthrough',
'no-swiftshader-gl'
'no-swiftshader-gl', 'no-vulkan', 'no-skia-renderer'
]))
def testGenerateVendorTagUsingDeviceString(self):
......@@ -220,7 +221,7 @@ class GpuIntegrationTestUnittest(unittest.TestCase):
set([
'mac', 'mojave', 'release', 'imagination',
'imagination-Triangle-Monster-3000', 'no-angle', 'no-passthrough',
'no-swiftshader-gl'
'no-swiftshader-gl', 'no-vulkan', 'no-skia-renderer'
]))
def testSimpleIntegrationTest(self):
......
......@@ -2,7 +2,7 @@
# tags: [ android-chromium android-webview-instrumentation android-not-webview debug ]
# tags: [ skia-renderer no-skia-renderer ]
# tags: [ use-gl no-use-gl ]
# tags: [ use-vulkan no-use-vulkan ]
# tags: [ vulkan no-vulkan ]
# tags: [ use-skia-dawn no-use-skia-dawn ]
# tags: [ amd amd-0x6613 amd-0x679e amd-0x6821 intel intel-0xa2e intel-0x5912
# intel-0xd26 nvidia qualcomm-adreno-(tm)-330 qualcomm-adreno-(tm)-418
......@@ -117,13 +117,13 @@ crbug.com/948141 Pixel_CanvasDisplaySRGBAccelerated2D [ Skip ]
# Fails on Nexus 5, 6 and 6P
crbug.com/883500 [ android no-skia-renderer qualcomm-adreno-(tm)-330 ] Pixel_BackgroundImage [ Skip ]
crbug.com/883500 [ android no-use-gl no-use-vulkan qualcomm-adreno-(tm)-420 ] Pixel_BackgroundImage [ Skip ]
crbug.com/883500 [ android no-use-gl no-use-vulkan qualcomm-adreno-(tm)-430 ] Pixel_BackgroundImage [ Skip ]
crbug.com/883500 [ android no-use-gl no-vulkan qualcomm-adreno-(tm)-420 ] Pixel_BackgroundImage [ Skip ]
crbug.com/883500 [ android no-use-gl no-vulkan qualcomm-adreno-(tm)-430 ] Pixel_BackgroundImage [ Skip ]
crbug.com/1029389 [ android qualcomm-adreno-(tm)-330 ] Pixel_PrecisionRoundedCorner [ Skip ]
# Flakes on Nexus 5X.
crbug.com/883500 [ android-chromium no-use-gl no-use-vulkan qualcomm-adreno-(tm)-418 ] Pixel_BackgroundImage [ RetryOnFailure ]
crbug.com/1068620 [ android android-chromium no-use-gl no-use-vulkan qualcomm-adreno-(tm)-418 ] Pixel_OffscreenCanvasWebGLPaintAfterResize [ RetryOnFailure ]
crbug.com/883500 [ android-chromium no-use-gl no-vulkan qualcomm-adreno-(tm)-418 ] Pixel_BackgroundImage [ RetryOnFailure ]
crbug.com/1068620 [ android android-chromium no-use-gl no-vulkan qualcomm-adreno-(tm)-418 ] Pixel_OffscreenCanvasWebGLPaintAfterResize [ RetryOnFailure ]
# We do not have software H.264 decoding on Android, so it can't survive a
# context loss which results in hardware decoder loss.
......@@ -161,7 +161,7 @@ crbug.com/974380 [ win ] Pixel_OffscreenCanvasUnaccelerated2DGPUCompositingWorke
crbug.com/974380 [ mac ] Pixel_OffscreenCanvasUnaccelerated2DGPUCompositingWorker [ Skip ]
# Skia Renderer, producing incorrect color in one quadrant
crbug.com/1008450 [ android use-vulkan skia-renderer ] Pixel_Video_BackdropFilter [ Skip ]
crbug.com/1008450 [ android vulkan skia-renderer ] Pixel_Video_BackdropFilter [ Skip ]
crbug.com/1008450 [ android skia-renderer ] Pixel_Video_MP4_Rounded_Corner [ Skip ]
# Test is producing a large number of visually identical images with minor (eg.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment