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

Side by Side Diff: content/test/gpu/page_sets/gpu_process_tests.py

Issue 2230803003: Revert of Fix a few gpu tests on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import sys 4 import sys
5 from telemetry.story import story_set as story_set_module 5 from telemetry.story import story_set as story_set_module
6 from telemetry.page import page_test 6 from telemetry.page import page_test
7 7
8 from gpu_tests import gpu_test_base 8 from gpu_tests import gpu_test_base
9 9
10 class GpuProcessSharedPageState(gpu_test_base.GpuSharedPageState): 10 class GpuProcessSharedPageState(gpu_test_base.GpuSharedPageState):
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 if len(system_info.gpu.aux_attributes['gl_renderer']) <= 0: 167 if len(system_info.gpu.aux_attributes['gl_renderer']) <= 0:
168 raise page_test.Failure('Must have a non-empty gl_renderer string') 168 raise page_test.Failure('Must have a non-empty gl_renderer string')
169 169
170 170
171 class NoGpuProcessSharedPageState(GpuProcessSharedPageState): 171 class NoGpuProcessSharedPageState(GpuProcessSharedPageState):
172 def __init__(self, test, finder_options, story_set): 172 def __init__(self, test, finder_options, story_set):
173 super(NoGpuProcessSharedPageState, self).__init__( 173 super(NoGpuProcessSharedPageState, self).__init__(
174 test, finder_options, story_set) 174 test, finder_options, story_set)
175 options = finder_options.browser_options 175 options = finder_options.browser_options
176 176
177 if options.browser_type.startswith('android'): 177 if sys.platform in ('cygwin', 'win32'):
178 # There is currently no entry in kSoftwareRenderingListJson that disables
179 # all gpu features on Android.
180 pass
181 elif sys.platform in ('cygwin', 'win32'):
182 # Hit id 34 from kSoftwareRenderingListJson. 178 # Hit id 34 from kSoftwareRenderingListJson.
183 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x5333') 179 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x5333')
184 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x8811') 180 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x8811')
185 elif sys.platform.startswith('linux'): 181 elif sys.platform.startswith('linux'):
186 # Hit id 50 from kSoftwareRenderingListJson. 182 # Hit id 50 from kSoftwareRenderingListJson.
187 options.AppendExtraBrowserArgs('--gpu-no-complete-info-collection') 183 options.AppendExtraBrowserArgs('--gpu-no-complete-info-collection')
188 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de') 184 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de')
189 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1') 185 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1')
190 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=VMware') 186 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=VMware')
191 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=softpipe') 187 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=softpipe')
192 options.AppendExtraBrowserArgs('--gpu-testing-gl-version="2.1 Mesa 10.1"') 188 options.AppendExtraBrowserArgs('--gpu-testing-gl-version="2.1 Mesa 10.1"')
193 elif sys.platform == 'darwin': 189 elif sys.platform == 'darwin':
194 # Hit id 81 from kSoftwareRenderingListJson. 190 # Hit id 81 from kSoftwareRenderingListJson.
195 options.AppendExtraBrowserArgs('--gpu-testing-os-version=10.7') 191 options.AppendExtraBrowserArgs('--gpu-testing-os-version=10.7')
196 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x15ad') 192 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x15ad')
197 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0393') 193 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0393')
198 194
199 195
200 class NoGpuProcessPage(gpu_test_base.PageBase): 196 class NoGpuProcessPage(gpu_test_base.PageBase):
201 197
202 def __init__(self, story_set, expectations, is_platform_android): 198 def __init__(self, story_set, expectations):
203 super(NoGpuProcessPage, self).__init__( 199 super(NoGpuProcessPage, self).__init__(
204 url='about:blank', 200 url='about:blank',
205 name='GpuProcess.no_gpu_process', 201 name='GpuProcess.no_gpu_process',
206 page_set=story_set, 202 page_set=story_set,
207 shared_page_state_class=NoGpuProcessSharedPageState, 203 shared_page_state_class=NoGpuProcessSharedPageState,
208 expectations=expectations) 204 expectations=expectations)
209 self.is_platform_android = is_platform_android
210 205
211 def Validate(self, tab, results): 206 def Validate(self, tab, results):
212 if self.is_platform_android:
213 return
214
215 has_gpu_process_js = 'chrome.gpuBenchmarking.hasGpuProcess()' 207 has_gpu_process_js = 'chrome.gpuBenchmarking.hasGpuProcess()'
216 has_gpu_process = tab.EvaluateJavaScript(has_gpu_process_js) 208 has_gpu_process = tab.EvaluateJavaScript(has_gpu_process_js)
217 if has_gpu_process: 209 if has_gpu_process:
218 raise page_test.Failure('GPU process detected') 210 raise page_test.Failure('GPU process detected')
219 211
220 212
221 class SoftwareGpuProcessSharedPageState(GpuProcessSharedPageState): 213 class SoftwareGpuProcessSharedPageState(GpuProcessSharedPageState):
222 def __init__(self, test, finder_options, story_set): 214 def __init__(self, test, finder_options, story_set):
223 super(SoftwareGpuProcessSharedPageState, self).__init__( 215 super(SoftwareGpuProcessSharedPageState, self).__init__(
224 test, finder_options, story_set) 216 test, finder_options, story_set)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 279
288 def Validate(self, tab, results): 280 def Validate(self, tab, results):
289 super(DriverBugWorkaroundsInGpuProcessPage, self).Validate(tab, results) 281 super(DriverBugWorkaroundsInGpuProcessPage, self).Validate(tab, results)
290 282
291 283
292 class DriverBugWorkaroundsUponGLRendererShared(GpuProcessSharedPageState): 284 class DriverBugWorkaroundsUponGLRendererShared(GpuProcessSharedPageState):
293 def __init__(self, test, finder_options, story_set): 285 def __init__(self, test, finder_options, story_set):
294 super(DriverBugWorkaroundsUponGLRendererShared, self).__init__( 286 super(DriverBugWorkaroundsUponGLRendererShared, self).__init__(
295 test, finder_options, story_set) 287 test, finder_options, story_set)
296 options = finder_options.browser_options 288 options = finder_options.browser_options
297 if options.browser_type.startswith('android'): 289 if sys.platform in ('cygwin', 'win32'):
298 # Hit id 108 from kGpuDriverBugListJson.
299 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=ARM')
300 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=Mali-400')
301 elif sys.platform in ('cygwin', 'win32'):
302 # Hit id 51 and 87 from kGpuDriverBugListJson. 290 # Hit id 51 and 87 from kGpuDriverBugListJson.
303 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x1002') 291 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x1002')
304 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x6779') 292 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x6779')
305 options.AppendExtraBrowserArgs('--gpu-testing-driver-date=11-20-2014') 293 options.AppendExtraBrowserArgs('--gpu-testing-driver-date=11-20-2014')
306 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=Google Inc.') 294 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=Google Inc.')
307 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=ANGLE ' \ 295 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=ANGLE ' \
308 '(AMD Radeon HD 6450 Direct3D11 vs_5_0 ps_5_0)') 296 '(AMD Radeon HD 6450 Direct3D11 vs_5_0 ps_5_0)')
309 options.AppendExtraBrowserArgs('--gpu-testing-gl-version=OpenGL ES 2.0 ' \ 297 options.AppendExtraBrowserArgs('--gpu-testing-gl-version=OpenGL ES 2.0 ' \
310 '(ANGLE 2.1.0.0c0d8006a9dd)') 298 '(ANGLE 2.1.0.0c0d8006a9dd)')
311 elif sys.platform.startswith('linux'): 299 elif sys.platform.startswith('linux'):
312 # Hit id 153 from kGpuDriverBugListJson. 300 # Hit id 153 from kGpuDriverBugListJson.
313 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x0101') 301 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x0101')
314 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0102') 302 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0102')
315 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=Vivante ' \ 303 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=Vivante ' \
316 'Corporation') 304 'Corporation')
317 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=Vivante GC1000') 305 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=Vivante GC1000')
318 elif sys.platform == 'darwin': 306 elif sys.platform == 'darwin':
319 # Currently on osx no workaround relies on gl-renderer. 307 # Currently on osx no workaround relies on gl-renderer.
320 pass 308 pass
321 309
322 310
323 class DriverBugWorkaroundsUponGLRendererPage(DriverBugWorkaroundsTestsPage): 311 class DriverBugWorkaroundsUponGLRendererPage(DriverBugWorkaroundsTestsPage):
324 def __init__(self, story_set, expectations, is_platform_android): 312 def __init__(self, story_set, expectations):
325 self.expected_workaround = None 313 self.expected_workaround = None
326 self.unexpected_workaround = None 314 self.unexpected_workaround = None
327 315
328 if is_platform_android: 316 if sys.platform in ('cygwin', 'win32'):
329 self.expected_workaround = "disable_gl_rgb_format"
330 elif sys.platform in ('cygwin', 'win32'):
331 self.expected_workaround = "texsubimage_faster_than_teximage" 317 self.expected_workaround = "texsubimage_faster_than_teximage"
332 self.unexpected_workaround = "disable_d3d11" 318 self.unexpected_workaround = "disable_d3d11"
333 elif sys.platform.startswith('linux'): 319 elif sys.platform.startswith('linux'):
334 self.expected_workaround = "disable_transparent_visuals" 320 self.expected_workaround = "disable_transparent_visuals"
335 elif sys.platform == 'darwin': 321 elif sys.platform == 'darwin':
336 pass 322 pass
337 super(DriverBugWorkaroundsUponGLRendererPage, self).__init__( 323 super(DriverBugWorkaroundsUponGLRendererPage, self).__init__(
338 name='GpuProcess.driver_bug_workarounds_upon_gl_renderer', 324 name='GpuProcess.driver_bug_workarounds_upon_gl_renderer',
339 page_set=story_set, 325 page_set=story_set,
340 shared_page_state_class=DriverBugWorkaroundsUponGLRendererShared, 326 shared_page_state_class=DriverBugWorkaroundsUponGLRendererShared,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 if sys.platform.startswith('linux'): 465 if sys.platform.startswith('linux'):
480 # Hit id 110 from kSoftwareRenderingListJson. 466 # Hit id 110 from kSoftwareRenderingListJson.
481 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de') 467 options.AppendExtraBrowserArgs('--gpu-testing-vendor-id=0x10de')
482 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1') 468 options.AppendExtraBrowserArgs('--gpu-testing-device-id=0x0de1')
483 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=VMware') 469 options.AppendExtraBrowserArgs('--gpu-testing-gl-vendor=VMware')
484 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=Gallium 0.4 ' \ 470 options.AppendExtraBrowserArgs('--gpu-testing-gl-renderer=Gallium 0.4 ' \
485 'on llvmpipe (LLVM 3.4, 256 bits)') 471 'on llvmpipe (LLVM 3.4, 256 bits)')
486 options.AppendExtraBrowserArgs('--gpu-testing-gl-version="3.0 Mesa 11.2"') 472 options.AppendExtraBrowserArgs('--gpu-testing-gl-version="3.0 Mesa 11.2"')
487 473
488 class ReadbackWebGLGpuProcessPage(gpu_test_base.PageBase): 474 class ReadbackWebGLGpuProcessPage(gpu_test_base.PageBase):
489 def __init__(self, story_set, expectations, is_platform_android): 475 def __init__(self, story_set, expectations):
490 super(ReadbackWebGLGpuProcessPage, self).__init__( 476 super(ReadbackWebGLGpuProcessPage, self).__init__(
491 url='chrome:gpu', 477 url='chrome:gpu',
492 name='GpuProcess.readback_webgl_gpu_process', 478 name='GpuProcess.readback_webgl_gpu_process',
493 page_set=story_set, 479 page_set=story_set,
494 shared_page_state_class=ReadbackWebGLGpuProcessSharedPageState, 480 shared_page_state_class=ReadbackWebGLGpuProcessSharedPageState,
495 expectations=expectations) 481 expectations=expectations)
496 self.is_platform_android = is_platform_android
497 482
498 def Validate(self, tab, results): 483 def Validate(self, tab, results):
499 if sys.platform.startswith('linux') and not self.is_platform_android: 484 if sys.platform.startswith('linux'):
500 feature_status_js = 'browserBridge.gpuInfo.featureStatus.featureStatus' 485 feature_status_js = 'browserBridge.gpuInfo.featureStatus.featureStatus'
501 feature_status_list = tab.EvaluateJavaScript(feature_status_js) 486 feature_status_list = tab.EvaluateJavaScript(feature_status_js)
502 result = True 487 result = True
503 for name, status in feature_status_list.items(): 488 for name, status in feature_status_list.items():
504 if name == 'multiple_raster_threads': 489 if name == 'multiple_raster_threads':
505 result = result and status == 'enabled_on' 490 result = result and status == 'enabled_on'
506 elif name == 'native_gpu_memory_buffers': 491 elif name == 'native_gpu_memory_buffers':
507 result = result and status == 'disabled_software' 492 result = result and status == 'disabled_software'
508 elif name == 'webgl': 493 elif name == 'webgl':
509 result = result and status == 'enabled_readback' 494 result = result and status == 'enabled_readback'
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 'GpuProcess.css3d'), 585 'GpuProcess.css3d'),
601 ('file://../../data/gpu/functional_webgl.html', 586 ('file://../../data/gpu/functional_webgl.html',
602 'GpuProcess.webgl') 587 'GpuProcess.webgl')
603 ] 588 ]
604 589
605 for url, name in urls_and_names_list: 590 for url, name in urls_and_names_list:
606 self.AddStory(GpuProcessTestsPage(url, name, self, expectations)) 591 self.AddStory(GpuProcessTestsPage(url, name, self, expectations))
607 592
608 self.AddStory(FunctionalVideoPage(self, expectations)) 593 self.AddStory(FunctionalVideoPage(self, expectations))
609 self.AddStory(GpuInfoCompletePage(self, expectations)) 594 self.AddStory(GpuInfoCompletePage(self, expectations))
610 self.AddStory(NoGpuProcessPage(self, expectations, is_platform_android)) 595 self.AddStory(NoGpuProcessPage(self, expectations))
611 self.AddStory(SoftwareGpuProcessPage(self, expectations)) 596 self.AddStory(SoftwareGpuProcessPage(self, expectations))
612 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations)) 597 self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations))
613 self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations, 598 self.AddStory(IdentifyActiveGpuPage1(self, expectations))
614 is_platform_android)) 599 self.AddStory(IdentifyActiveGpuPage2(self, expectations))
615 self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations, 600 self.AddStory(IdentifyActiveGpuPage3(self, expectations))
616 is_platform_android)) 601 self.AddStory(IdentifyActiveGpuPage4(self, expectations))
602 self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
603 self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations))
617 self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self, 604 self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self,
618 expectations)) 605 expectations))
619 if not is_platform_android: 606 if not is_platform_android:
620 self.AddStory(SkipGpuProcessPage(self, expectations)) 607 self.AddStory(SkipGpuProcessPage(self, expectations))
621 self.AddStory(HasTransparentVisualsGpuProcessPage(self, expectations)) 608 self.AddStory(HasTransparentVisualsGpuProcessPage(self, expectations))
622 self.AddStory(NoTransparentVisualsGpuProcessPage(self, expectations)) 609 self.AddStory(NoTransparentVisualsGpuProcessPage(self, expectations))
623 610
624 # There is no Android multi-gpu configuration and the helper
625 # gpu_info_collector.cc::IdentifyActiveGPU is not even called.
626 self.AddStory(IdentifyActiveGpuPage1(self, expectations))
627 self.AddStory(IdentifyActiveGpuPage2(self, expectations))
628 self.AddStory(IdentifyActiveGpuPage3(self, expectations))
629 self.AddStory(IdentifyActiveGpuPage4(self, expectations))
630
631 @property 611 @property
632 def allow_mixed_story_states(self): 612 def allow_mixed_story_states(self):
633 # Return True here in order to be able to run pages with different browser 613 # Return True here in order to be able to run pages with different browser
634 # command line arguments. 614 # command line arguments.
635 return True 615 return True
OLDNEW
« 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