Commit 774e87a5 authored by geofflang's avatar geofflang Committed by Commit bot

Run the WebGL conformance tests with the passthrough command decoder.

BUG=668223
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2529713002
Cr-Commit-Position: refs/heads/master@{#436316}
parent 354c7063
......@@ -127,6 +127,9 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
base::Int64ToString(gpu_info.initialization_time.InMilliseconds())));
basic_info->Append(NewDescriptionValuePair(
"In-process GPU", new base::FundamentalValue(gpu_info.in_process_gpu)));
basic_info->Append(NewDescriptionValuePair(
"Passthrough Command Decoder",
new base::FundamentalValue(gpu_info.passthrough_cmd_decoder)));
basic_info->Append(NewDescriptionValuePair(
"Sandboxed", new base::FundamentalValue(gpu_info.sandboxed)));
basic_info->Append(NewDescriptionValuePair(
......
......@@ -162,7 +162,8 @@ static const char* const kSwitchNames[] = {
switches::kGpuTestingGLVendor,
switches::kGpuTestingGLRenderer,
switches::kGpuTestingGLVersion,
switches::kDisableGpuDriverBugWorkarounds};
switches::kDisableGpuDriverBugWorkarounds,
switches::kUsePassthroughCmdDecoder};
enum GPUProcessLifetimeEvent {
LAUNCHED,
......
......@@ -5,7 +5,7 @@
from gpu_tests import test_expectations
ANGLE_CONDITIONS = ['d3d9', 'd3d11', 'opengl', 'no_angle']
CMD_DECODER_CONDITIONS = ['passthrough', 'no_passthrough']
GPU_CONDITIONS = ['amd', 'arm', 'broadcom', 'hisilicon', 'intel', 'imagination',
'nvidia', 'qualcomm', 'vivante']
......@@ -15,6 +15,7 @@ class GpuExpectation(test_expectations.Expectation):
self.gpu_conditions = []
self.device_id_conditions = []
self.angle_conditions = []
self.cmd_decoder_conditions = []
self.max_num_retries = max_num_retries
assert self.max_num_retries == 0 or expectation == 'flaky'
super(GpuExpectation, self).__init__(
......@@ -67,6 +68,8 @@ class GpuExpectation(test_expectations.Expectation):
self.gpu_conditions.append(cl)
elif cl in ANGLE_CONDITIONS:
self.angle_conditions.append(cl)
elif cl in CMD_DECODER_CONDITIONS:
self.cmd_decoder_conditions.append(cl)
else:
# Delegate to superclass.
super(GpuExpectation, self).ParseCondition(condition)
......@@ -112,8 +115,12 @@ class GpuTestExpectations(test_expectations.TestExpectations):
angle_matches = (
(not expectation.angle_conditions) or
angle_renderer in expectation.angle_conditions)
cmd_decoder = self._GetCommandDecoder(gpu_info)
cmd_decoder_matches = (
(not expectation.cmd_decoder_conditions) or
cmd_decoder in expectation.cmd_decoder_conditions)
return gpu_matches and angle_matches
return gpu_matches and angle_matches and cmd_decoder_matches
def _GetGpuVendorString(self, gpu_info):
if gpu_info:
......@@ -149,3 +156,9 @@ class GpuTestExpectations(test_expectations.TestExpectations):
elif 'OpenGL' in gl_renderer:
return 'opengl'
return 'no_angle'
def _GetCommandDecoder(self, gpu_info):
if gpu_info and gpu_info.aux_attributes and \
gpu_info.aux_attributes.get('passthrough_cmd_decoder', False):
return 'passthrough'
return 'no_passthrough'
......@@ -133,14 +133,14 @@ class WebGLConformanceExpectations(GpuTestExpectations):
# Win NVIDIA failures
self.Flaky('conformance/textures/misc/texture-npot-video.html',
['win', 'nvidia'], bug=626524)
['win', 'nvidia', 'no_passthrough'], bug=626524)
self.Flaky('conformance/textures/misc/texture-upload-size.html',
['win', 'nvidia'], bug=630860)
# Win7 / Intel failures
self.Fail('conformance/textures/misc/' +
'copy-tex-image-and-sub-image-2d.html',
['win7', 'intel'])
['win7', 'intel', 'no_passthrough'])
# Win / AMD flakiness seen on new tryservers.
# It's unfortunate that this suppression needs to be so broad, but
......@@ -214,6 +214,114 @@ class WebGLConformanceExpectations(GpuTestExpectations):
self.Fail('conformance/uniforms/uniform-default-values.html',
['win', 'intel', 'opengl'], bug=1007) # angle bug ID
# Win / Passthrough command decoder
self.Fail('conformance/attribs/gl-vertexattribpointer.html',
['win', 'passthrough', 'd3d11'], bug=1523) # angle bug ID
self.Fail('conformance/extensions/*', ['win', 'passthrough', 'd3d11'],
bug=1523) # angle bug ID
self.Fail('conformance/canvas/framebuffer-bindings-unaffected-on-' +
'resize.html', ['win', 'passthrough', 'd3d11'], bug=665521)
self.Fail('conformance/glsl/bugs/essl3-shaders-with-webgl1.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/misc/attrib-location-length-limits.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/misc/shader-varying-packing-restrictions.html',
['win', 'passthrough', 'd3d11'], bug=1638) # angle bug ID
self.Fail('conformance/glsl/misc/shader-with-257-character-define.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/misc/shader-with-257-character-identifier.' +
'frag.html', ['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/misc/shader-with-dfdx.frag.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/misc/shaders-with-invariance.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/misc/shaders-with-name-conflicts.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/misc/shaders-with-uniform-structs.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/glsl/variables/glsl-built-ins.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/limits/gl-line-width.html',
['win', 'passthrough', 'd3d11'], bug=1523) # angle bug ID
self.Fail('conformance/misc/error-reporting.html',
['win', 'passthrough', 'd3d11'], bug=602688)
self.Fail('conformance/misc/invalid-passed-params.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/misc/object-deletion-behaviour.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/misc/type-conversion-test.html',
['win', 'passthrough', 'd3d11'], bug=602688)
self.Fail('conformance/misc/uninitialized-test.html',
['win', 'passthrough', 'd3d11'], bug=1635) # angle bug ID
self.Fail('conformance/misc/webgl-specific.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/more/conformance/quickCheckAPI-B2.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/more/conformance/quickCheckAPI-D_G.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/more/functions/copyTexImage2D.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/more/functions/copyTexImage2DBadArgs.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/more/functions/copyTexSubImage2D.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/more/functions/drawArrays.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/more/functions/drawArraysOutOfBounds.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/more/functions/drawElementsBadArgs.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/more/functions/texSubImage2DBadArgs.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/more/functions/texSubImage2DHTMLBadArgs.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/more/functions/vertexAttribPointerBadArgs.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/programs/get-active-test.html',
['win', 'passthrough', 'd3d11'], bug=602688)
self.Fail('conformance/programs/program-test.html',
['win', 'passthrough', 'd3d11'], bug=602688)
self.Fail('conformance/reading/read-pixels-test.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/renderbuffers/feedback-loop.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/renderbuffers/framebuffer-object-attachment.html',
['win', 'passthrough', 'd3d11'], bug=602688)
self.Fail('conformance/renderbuffers/framebuffer-test.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/rendering/draw-arrays-out-of-bounds.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/rendering/draw-elements-out-of-bounds.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/textures/misc/copy-tex-image-2d-formats.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/textures/misc/copy-tex-image-and-sub-image-2d.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/textures/misc/mipmap-fbo.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/textures/misc/tex-input-validation.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/textures/misc/texture-active-bind-2.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/textures/misc/texture-attachment-formats.html',
['win', 'passthrough', 'd3d11'], bug=602688)
self.Fail('conformance/textures/misc/texture-copying-feedback-loops.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/textures/misc/texture-fakeblack.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/textures/misc/texture-mips.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/textures/misc/texture-npot.html',
['win', 'passthrough', 'd3d11'], bug=665518)
self.Fail('conformance/textures/misc/texture-npot-video.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('conformance/uniforms/uniform-samplers-test.html',
['win', 'passthrough', 'd3d11'], bug=1639) # angle bug ID
self.Fail('WebglExtension_OES_texture_float_linear',
['win', 'passthrough', 'd3d11'], bug=1523) # angle bug ID
self.Fail('WebglExtension_OES_texture_half_float_linear',
['win', 'passthrough', 'd3d11'], bug=1523) # angle bug ID
# Mac failures
self.Flaky('conformance/extensions/oes-texture-float-with-video.html',
['mac'], bug=599272)
......
......@@ -107,6 +107,7 @@ class WebGLConformanceExpectationsTest(unittest.TestCase):
(
set(e.os_conditions),
set(e.browser_conditions),
set(e.cmd_decoder_conditions),
set(e.angle_conditions),
),
set(e.gpu_conditions),
......
......@@ -76,6 +76,7 @@ GPUInfo::GPUInfo()
sandboxed(false),
process_crash_count(0),
in_process_gpu(true),
passthrough_cmd_decoder(false),
basic_info_state(kCollectInfoNone),
context_info_state(kCollectInfoNone),
#if defined(OS_WIN)
......@@ -125,6 +126,7 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
bool sandboxed;
int process_crash_count;
bool in_process_gpu;
bool passthrough_cmd_decoder;
CollectInfoResult basic_info_state;
CollectInfoResult context_info_state;
#if defined(OS_WIN)
......@@ -188,6 +190,7 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
enumerator->AddBool("sandboxed", sandboxed);
enumerator->AddInt("processCrashCount", process_crash_count);
enumerator->AddBool("inProcessGpu", in_process_gpu);
enumerator->AddBool("passthroughCmdDecoder", passthrough_cmd_decoder);
enumerator->AddInt("basicInfoState", basic_info_state);
enumerator->AddInt("contextInfoState", context_info_state);
#if defined(OS_WIN)
......
......@@ -224,6 +224,9 @@ struct GPU_EXPORT GPUInfo {
// True if the GPU is running in the browser process instead of its own.
bool in_process_gpu;
// True if the GPU process is using the passthrough command decoder.
bool passthrough_cmd_decoder;
// The state of whether the basic/context/DxDiagnostics info is collected and
// if the collection fails or not.
CollectInfoResult basic_info_state;
......
......@@ -228,6 +228,8 @@ void MergeGPUInfoGL(GPUInfo* basic_gpu_info,
basic_gpu_info->sandboxed = context_gpu_info.sandboxed;
basic_gpu_info->direct_rendering = context_gpu_info.direct_rendering;
basic_gpu_info->in_process_gpu = context_gpu_info.in_process_gpu;
basic_gpu_info->passthrough_cmd_decoder =
context_gpu_info.passthrough_cmd_decoder;
basic_gpu_info->context_info_state = context_gpu_info.context_info_state;
basic_gpu_info->initialization_time = context_gpu_info.initialization_time;
basic_gpu_info->video_decode_accelerator_capabilities =
......
......@@ -102,6 +102,7 @@ struct GpuInfo {
bool sandboxed;
int32 process_crash_count;
bool in_process_gpu;
bool passthrough_cmd_decoder;
CollectInfoResult basic_info_state;
CollectInfoResult context_info_state;
CollectInfoResult dx_diagnostics_info_state;
......
......@@ -224,6 +224,7 @@ bool StructTraits<gpu::mojom::GpuInfoDataView, gpu::GPUInfo>::Read(
out->direct_rendering = data.direct_rendering();
out->sandboxed = data.sandboxed();
out->in_process_gpu = data.in_process_gpu();
out->passthrough_cmd_decoder = data.passthrough_cmd_decoder();
out->process_crash_count = data.process_crash_count();
out->jpeg_decode_accelerator_supported =
data.jpeg_decode_accelerator_supported();
......
......@@ -243,6 +243,10 @@ struct StructTraits<gpu::mojom::GpuInfoDataView, gpu::GPUInfo> {
return input.in_process_gpu;
}
static bool passthrough_cmd_decoder(const gpu::GPUInfo& input) {
return input.passthrough_cmd_decoder;
}
static gpu::CollectInfoResult basic_info_state(const gpu::GPUInfo& input) {
return input.basic_info_state;
}
......
......@@ -91,6 +91,7 @@ IPC_STRUCT_TRAITS_BEGIN(gpu::GPUInfo)
IPC_STRUCT_TRAITS_MEMBER(sandboxed)
IPC_STRUCT_TRAITS_MEMBER(process_crash_count)
IPC_STRUCT_TRAITS_MEMBER(in_process_gpu)
IPC_STRUCT_TRAITS_MEMBER(passthrough_cmd_decoder)
IPC_STRUCT_TRAITS_MEMBER(basic_info_state)
IPC_STRUCT_TRAITS_MEMBER(context_info_state)
#if defined(OS_WIN)
......
......@@ -148,6 +148,7 @@ TEST_F(StructTraitsTest, GpuInfo) {
const bool sandboxed = true;
const int process_crash_count = 0xdead;
const bool in_process_gpu = true;
const bool passthrough_cmd_decoder = true;
const gpu::CollectInfoResult basic_info_state =
gpu::CollectInfoResult::kCollectInfoSuccess;
const gpu::CollectInfoResult context_info_state =
......@@ -197,6 +198,7 @@ TEST_F(StructTraitsTest, GpuInfo) {
input.sandboxed = sandboxed;
input.process_crash_count = process_crash_count;
input.in_process_gpu = in_process_gpu;
input.passthrough_cmd_decoder = passthrough_cmd_decoder;
input.basic_info_state = basic_info_state;
input.context_info_state = context_info_state;
#if defined(OS_WIN)
......@@ -259,6 +261,7 @@ TEST_F(StructTraitsTest, GpuInfo) {
EXPECT_EQ(sandboxed, output.sandboxed);
EXPECT_EQ(process_crash_count, output.process_crash_count);
EXPECT_EQ(in_process_gpu, output.in_process_gpu);
EXPECT_EQ(passthrough_cmd_decoder, output.passthrough_cmd_decoder);
EXPECT_EQ(basic_info_state, output.basic_info_state);
EXPECT_EQ(context_info_state, output.context_info_state);
#if defined(OS_WIN)
......
......@@ -158,6 +158,9 @@ bool GpuInit::InitializeAndStartSandbox(const base::CommandLine& command_line) {
#endif
gpu_info_.in_process_gpu = false;
gpu_info_.passthrough_cmd_decoder =
command_line.HasSwitch(switches::kUsePassthroughCmdDecoder);
sandbox_helper_->PreSandboxStartup();
#if defined(OS_LINUX)
......
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