Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1557)

Unified Diff: content/test/gpu/page_sets/gpu_process_tests.py

Issue 2227893005: Fix a few gpu tests on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make DriverBugWorkaroundsUponGLRendererPage more robust on Android Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_process_expectations.py ('k') | gpu/config/gpu_info_collector_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/page_sets/gpu_process_tests.py
diff --git a/content/test/gpu/page_sets/gpu_process_tests.py b/content/test/gpu/page_sets/gpu_process_tests.py
index dbe8bebf270c8b0cf5c35e4f08529b5724f2308d..0e41351e210a23fa924d6aa3b25a6f2a3cb6d45e 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -174,7 +174,11 @@ class NoGpuProcessSharedPageState(GpuProcessSharedPageState):
test, finder_options, story_set)
options = finder_options.browser_options
- if sys.platform in ('cygwin', 'win32'):
+ if options.browser_type.startswith('android'):
+ # Hit id 8 from kSoftwareRenderingListJson, which applies to any platform.
+ options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de')
+ options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0324')
+ elif sys.platform in ('cygwin', 'win32'):
# Hit id 34 from kSoftwareRenderingListJson.
options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x5333')
options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x8811')
@@ -215,6 +219,8 @@ class SoftwareGpuProcessSharedPageState(GpuProcessSharedPageState):
super(SoftwareGpuProcessSharedPageState, self).__init__(
test, finder_options, story_set)
options = finder_options.browser_options
+
+ # Hit exception from id 50 from kSoftwareRenderingListJson.
options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de')
options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1')
options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=VMware')
@@ -286,7 +292,14 @@ class DriverBugWorkaroundsUponGLRendererShared(GpuProcessSharedPageState):
super(DriverBugWorkaroundsUponGLRendererShared, self).__init__(
test, finder_options, story_set)
options = finder_options.browser_options
- if sys.platform in ('cygwin', 'win32'):
+ if options.browser_type.startswith('android'):
+ # Hit id 108 from kGpuDriverBugListJson.
+ options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=' \
+ 'NVIDIA Corporation')
+ options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=NVIDIA Tegra')
+ options.AppendExtraBrowserArgs('--gpu-testing-gl-version=' \
+ 'OpenGL ES 3.1 NVIDIA 343.00')
+ elif sys.platform in ('cygwin', 'win32'):
# Hit id 51 and 87 from kGpuDriverBugListJson.
options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x1002')
options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x6779')
@@ -308,11 +321,14 @@ class DriverBugWorkaroundsUponGLRendererShared(GpuProcessSharedPageState):
class DriverBugWorkaroundsUponGLRendererPage(DriverBugWorkaroundsTestsPage):
- def __init__(self, story_set, expectations):
+ def __init__(self, story_set, expectations, is_platform_android):
self.expected_workaround = None
self.unexpected_workaround = None
- if sys.platform in ('cygwin', 'win32'):
+ if is_platform_android:
+ self.expected_workaround = \
+ "unpack_overlapping_rows_separately_unpack_buffer"
+ elif sys.platform in ('cygwin', 'win32'):
self.expected_workaround = "texsubimage_faster_than_teximage"
self.unexpected_workaround = "disable_d3d11"
elif sys.platform.startswith('linux'):
@@ -460,8 +476,9 @@ class ReadbackWebGLGpuProcessSharedPageState(GpuProcessSharedPageState):
super(ReadbackWebGLGpuProcessSharedPageState, self).__init__(
test, finder_options, story_set)
options = finder_options.browser_options
+ is_platform_android = options.browser_type.startswith('android')
- if sys.platform.startswith('linux'):
+ if sys.platform.startswith('linux') and not is_platform_android:
# Hit id 110 from kSoftwareRenderingListJson.
options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de')
options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1')
@@ -471,16 +488,17 @@ class ReadbackWebGLGpuProcessSharedPageState(GpuProcessSharedPageState):
options.AppendExtraBrowserArgs('--gpu-testing-gl-version="3.0 Mesa 11.2"')
class ReadbackWebGLGpuProcessPage(gpu_test_base.PageBase):
- def __init__(self, story_set, expectations):
+ def __init__(self, story_set, expectations, is_platform_android):
super(ReadbackWebGLGpuProcessPage, self).__init__(
url='chrome:gpu',
name='GpuProcess.readback_webgl_gpu_process',
page_set=story_set,
shared_page_state_class=ReadbackWebGLGpuProcessSharedPageState,
expectations=expectations)
+ self.is_platform_android = is_platform_android
def Validate(self, tab, results):
- if sys.platform.startswith('linux'):
+ if sys.platform.startswith('linux') and not self.is_platform_android:
feature_status_js = 'browserBridge.gpuInfo.featureStatus.featureStatus'
feature_status_list = tab.EvaluateJavaScript(feature_status_js)
result = True
@@ -592,14 +610,11 @@ class GpuProcessTestsStorySet(story_set_module.StorySet):
self.AddStory(FunctionalVideoPage(self, expectations))
self.AddStory(GpuInfoCompletePage(self, expectations))
self.AddStory(NoGpuProcessPage(self, expectations))
- self.AddStory(SoftwareGpuProcessPage(self, expectations))
self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations))
- self.AddStory(IdentifyActiveGpuPage1(self, expectations))
- self.AddStory(IdentifyActiveGpuPage2(self, expectations))
- self.AddStory(IdentifyActiveGpuPage3(self, expectations))
- self.AddStory(IdentifyActiveGpuPage4(self, expectations))
- self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
- self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations))
+ self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations,
+ is_platform_android))
+ self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations,
+ is_platform_android))
self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self,
expectations))
if not is_platform_android:
@@ -607,6 +622,17 @@ class GpuProcessTestsStorySet(story_set_module.StorySet):
self.AddStory(HasTransparentVisualsGpuProcessPage(self, expectations))
self.AddStory(NoTransparentVisualsGpuProcessPage(self, expectations))
+ # There is no Android multi-gpu configuration and the helper
+ # gpu_info_collector.cc::IdentifyActiveGPU is not even called.
+ self.AddStory(IdentifyActiveGpuPage1(self, expectations))
+ self.AddStory(IdentifyActiveGpuPage2(self, expectations))
+ self.AddStory(IdentifyActiveGpuPage3(self, expectations))
+ self.AddStory(IdentifyActiveGpuPage4(self, expectations))
+
+ # There is currently no entry in kSoftwareRenderingListJson that enables
+ # a software GL driver on Android.
+ self.AddStory(SoftwareGpuProcessPage(self, expectations))
+
@property
def allow_mixed_story_states(self):
# Return True here in order to be able to run pages with different browser
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_process_expectations.py ('k') | gpu/config/gpu_info_collector_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698