Commit 012bb91b authored by Lin Sun's avatar Lin Sun Committed by Commit Bot

Extract driver vendor with ANGLE's OpenGL and Vulkan backend

Extract driver vendor from ANGLE's renderer description according to the
format implemented in OpenGL and Vulkan backend.

Bug: 994852
Change-Id: I0b72166b504f1a83762a12f1d574c8cd20bf9df3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903404Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Commit-Queue: Lin Sun <lin.sun@intel.com>
Cr-Commit-Position: refs/heads/master@{#715154}
parent 215a5be0
......@@ -8,8 +8,8 @@ import mock
# This set must be the union of the driver tags used in WebGL and WebGL2
# expectations files.
EXPECTATIONS_DRIVER_TAGS = frozenset([
'angle_lt_25.20.100.6444',
'angle_lt_25.20.100.6577',
'intel_lt_25.20.100.6444',
'intel_lt_25.20.100.6577',
'mesa_lt_19.1.2',
'mesa_eq_18.0.5',
])
......
......@@ -6,7 +6,7 @@
# nvidia nvidia-0xf02 nvidia-0xfe9 nvidia-0x1cb3
# qualcomm qualcomm-adreno-(tm)-540 ]
# tags: [ debug ]
# tags: [ angle_lt_25.20.100.6444 angle_lt_25.20.100.6577 mesa_lt_19.1.2 ]
# tags: [ intel_lt_25.20.100.6444 intel_lt_25.20.100.6577 mesa_lt_19.1.2 ]
# results: [ Failure RetryOnFailure Skip ]
......@@ -119,19 +119,19 @@ crbug.com/602688 [ opengl win passthrough intel ] conformance2/glsl3/vector-dyna
# This case causes no-over-optimization-on-uniform-array fail.
crbug.com/884210 [ opengl win passthrough intel ] conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html [ Skip ]
crbug.com/602688 [ opengl win passthrough intel angle_lt_25.20.100.6577 ] conformance/glsl/constructors/glsl-construct-mat2.html [ Failure ]
crbug.com/602688 [ opengl win passthrough intel angle_lt_25.20.100.6577 ] conformance2/textures/misc/texture-npot.html [ Failure ]
crbug.com/854100 [ opengl win passthrough intel angle_lt_25.20.100.6577 ] conformance/glsl/variables/gl-pointcoord.html [ Failure ]
crbug.com/957631 [ opengl win passthrough intel angle_lt_25.20.100.6577 ] conformance2/rendering/element-index-uint.html [ Failure ]
crbug.com/angleproject/2880 [ opengl win passthrough intel angle_lt_25.20.100.6577 ] deqp/functional/gles3/shaderbuiltinvar.html [ Failure ]
crbug.com/602688 [ opengl win passthrough intel intel_lt_25.20.100.6577 ] conformance/glsl/constructors/glsl-construct-mat2.html [ Failure ]
crbug.com/602688 [ opengl win passthrough intel intel_lt_25.20.100.6577 ] conformance2/textures/misc/texture-npot.html [ Failure ]
crbug.com/854100 [ opengl win passthrough intel intel_lt_25.20.100.6577 ] conformance/glsl/variables/gl-pointcoord.html [ Failure ]
crbug.com/957631 [ opengl win passthrough intel intel_lt_25.20.100.6577 ] conformance2/rendering/element-index-uint.html [ Failure ]
crbug.com/angleproject/2880 [ opengl win passthrough intel intel_lt_25.20.100.6577 ] deqp/functional/gles3/shaderbuiltinvar.html [ Failure ]
# This is an OpenGL driver bug on Intel platform and it is fixed in
# Intel Driver 25.20.100.6444.
# Case no-over-optimization-on-uniform-array-08 always fail if run
# case gl-min-uniforms first.
# Temporarily skip these two cases now.
crbug.com/953243 [ opengl win passthrough intel angle_lt_25.20.100.6444 ] conformance/limits/gl-min-uniforms.html [ Skip ]
crbug.com/953243 [ opengl win passthrough intel angle_lt_25.20.100.6444 ] conformance/uniforms/no-over-optimization-on-uniform-array-08.html [ Skip ]
crbug.com/953243 [ opengl win passthrough intel intel_lt_25.20.100.6444 ] conformance/limits/gl-min-uniforms.html [ Skip ]
crbug.com/953243 [ opengl win passthrough intel intel_lt_25.20.100.6444 ] conformance/uniforms/no-over-optimization-on-uniform-array-08.html [ Skip ]
# This is an OpenGL driver bug on Intel platform and it is fixed in
# Intel Driver 25.20.100.6444.
......@@ -139,8 +139,8 @@ crbug.com/953243 [ opengl win passthrough intel angle_lt_25.20.100.6444 ] confor
# case biuDepthRange_001_to_002 first.
# Temporarily skip these two cases now because this issue blocks
# WEBGL_video_texture implementation.
crbug.com/907195 [ opengl win passthrough intel angle_lt_25.20.100.6444 ] conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html [ Skip ]
crbug.com/907195 [ opengl win passthrough intel angle_lt_25.20.100.6444 ] conformance/uniforms/no-over-optimization-on-uniform-array-09.html [ Skip ]
crbug.com/907195 [ opengl win passthrough intel intel_lt_25.20.100.6444 ] conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html [ Skip ]
crbug.com/907195 [ opengl win passthrough intel intel_lt_25.20.100.6444 ] conformance/uniforms/no-over-optimization-on-uniform-array-09.html [ Skip ]
# Windows only.
crbug.com/736926 [ win ] conformance2/textures/svg_image/tex-2d-rgb565-rgb-unsigned_short_5_6_5.html [ RetryOnFailure ]
......
......@@ -8,7 +8,7 @@
# tags: [ d3d11 d3d9 no-angle opengl opengles vulkan ]
# tags: [ no-passthrough passthrough ]
# tags: [ webgl-version-1 ]
# tags: [ angle_lt_25.20.100.6444 mesa_eq_18.0.5 ]
# tags: [ intel_lt_25.20.100.6444 mesa_eq_18.0.5 ]
# results: [ Failure RetryOnFailure Skip ]
......@@ -137,8 +137,8 @@ crbug.com/angleproject/2722 [ win intel vulkan passthrough ] conformance/renderi
# case biuDepthRange_001_to_002 first.
# Temporarily skip these two cases now because this issue blocks
# WEBGL_video_texture implementation.
crbug.com/907195 [ win intel opengl passthrough angle_lt_25.20.100.6444 ] conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html [ Skip ]
crbug.com/907195 [ win intel opengl passthrough angle_lt_25.20.100.6444 ] conformance/uniforms/no-over-optimization-on-uniform-array-09.html [ Skip ]
crbug.com/907195 [ win intel opengl passthrough intel_lt_25.20.100.6444 ] conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html [ Skip ]
crbug.com/907195 [ win intel opengl passthrough intel_lt_25.20.100.6444 ] conformance/uniforms/no-over-optimization-on-uniform-array-09.html [ Skip ]
# TODO(kbr): re-enable suppression for same test below once fixed.
crbug.com/angleproject/2103 [ win ] conformance/glsl/bugs/sampler-struct-function-arg.html [ Skip ]
......
......@@ -189,13 +189,28 @@ void GLVersionInfo::ExtractDriverVendorANGLE(const char* renderer_str) {
DCHECK_EQ("ANGLE", driver_vendor);
base::StringPiece rstr(renderer_str);
DCHECK(base::StartsWith(rstr, "ANGLE (", base::CompareCase::SENSITIVE));
rstr = rstr.substr(sizeof("ANGLE (") - 1);
rstr = rstr.substr(sizeof("ANGLE (") - 1, rstr.size() - sizeof("ANGLE ("));
if (base::StartsWith(rstr, "Vulkan ", base::CompareCase::SENSITIVE)) {
size_t pos = rstr.find('(');
if (pos != std::string::npos)
rstr = rstr.substr(pos + 1, rstr.size() - 2);
}
if (base::StartsWith(rstr, "NVIDIA ", base::CompareCase::SENSITIVE))
driver_vendor = "ANGLE (NVIDIA)";
else if (base::StartsWith(rstr, "Radeon ", base::CompareCase::SENSITIVE))
driver_vendor = "ANGLE (AMD)";
else if (base::StartsWith(rstr, "Intel(R) ", base::CompareCase::SENSITIVE))
driver_vendor = "ANGLE (Intel)";
else if (base::StartsWith(rstr, "Intel", base::CompareCase::SENSITIVE)) {
std::vector<base::StringPiece> pieces = base::SplitStringPiece(
rstr, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
for (size_t ii = 0; ii < pieces.size(); ++ii) {
if (base::StartsWith(pieces[ii], "Intel(R) ",
base::CompareCase::SENSITIVE)) {
driver_vendor = "ANGLE (Intel)";
break;
}
}
}
}
bool GLVersionInfo::IsES3Capable(const gfx::ExtensionSet& extensions) const {
......
......@@ -74,18 +74,30 @@ TEST(GLVersionInfoTest, DriverVendorForANGLE) {
bool expected_is_es;
bool expected_is_es2;
bool expected_is_es3;
bool expected_is_d3d;
const char* expected_driver_vendor;
const char* expected_driver_version;
} kTestData[] = {
{"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)",
"ANGLE (NVIDIA Quadro P400 Direct3D11 vs_5_0 ps_5_0)", 2, 0, true, true,
false, "ANGLE (NVIDIA)", "2.1.0.44063c804e4f"},
"ANGLE (NVIDIA Quadro P400 Direct3D11 vs_5_0 ps_5_0)",
2, 0, true, true, false, true,
"ANGLE (NVIDIA)", "2.1.0.44063c804e4f"},
{"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)",
"ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)", 2, 0, true,
true, false, "ANGLE (Intel)", "2.1.0.44063c804e4f"},
"ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)",
2, 0, true, true, false, true,
"ANGLE (Intel)", "2.1.0.44063c804e4f"},
{"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)",
"ANGLE (Radeon RX550/550 Series Direct3D11 vs_5_0 ps_5_0)", 2, 0, true,
true, false, "ANGLE (AMD)", "2.1.0.44063c804e4f"},
"ANGLE (Radeon RX550/550 Series Direct3D11 vs_5_0 ps_5_0)",
2, 0, true, true, false, true,
"ANGLE (AMD)", "2.1.0.44063c804e4f"},
{"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)",
"ANGLE (Vulkan 1.1.120(Intel(R) UHD Graphics 630 (0x00003E92)))",
2, 0, true, true, false, false,
"ANGLE (Intel)", "2.1.0.44063c804e4f"},
{"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)",
"ANGLE (Intel, Intel(R) UHD Graphics 630, OpenGL 4.5 core)",
2, 0, true, true, false, false,
"ANGLE (Intel)", "2.1.0.44063c804e4f"},
};
gfx::ExtensionSet extensions;
......@@ -93,13 +105,13 @@ TEST(GLVersionInfoTest, DriverVendorForANGLE) {
GLVersionInfo version_info(kTestData[ii].gl_version,
kTestData[ii].gl_renderer, extensions);
EXPECT_TRUE(version_info.is_angle);
EXPECT_TRUE(version_info.is_d3d);
EXPECT_EQ(kTestData[ii].expected_gl_major, version_info.major_version);
EXPECT_EQ(kTestData[ii].expected_gl_minor, version_info.minor_version);
EXPECT_EQ(kTestData[ii].expected_is_es, version_info.is_es);
EXPECT_EQ(kTestData[ii].expected_is_es2, version_info.is_es2);
EXPECT_EQ(kTestData[ii].expected_is_es3, version_info.is_es3);
EXPECT_EQ(kTestData[ii].expected_is_d3d, version_info.is_d3d);
EXPECT_STREQ(kTestData[ii].expected_driver_vendor,
version_info.driver_vendor.c_str());
EXPECT_STREQ(kTestData[ii].expected_driver_version,
......
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