diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 17:21:03 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 16:25:15 +0000 |
commit | c551f43206405019121bd2b2c93714319a0a3300 (patch) | |
tree | 1f48c30631c421fd4bbb3c36da20183c8a2ed7d7 /chromium/gpu/config | |
parent | 7961cea6d1041e3e454dae6a1da660b453efd238 (diff) | |
download | qtwebengine-chromium-c551f43206405019121bd2b2c93714319a0a3300.tar.gz |
BASELINE: Update Chromium to 79.0.3945.139
Change-Id: I336b7182fab9bca80b709682489c07db112eaca5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/gpu/config')
21 files changed, 212 insertions, 133 deletions
diff --git a/chromium/gpu/config/BUILD.gn b/chromium/gpu/config/BUILD.gn index 6fa086638cd..d595e1b10f6 100644 --- a/chromium/gpu/config/BUILD.gn +++ b/chromium/gpu/config/BUILD.gn @@ -97,8 +97,8 @@ jumbo_source_set("config_sources") { sources = [ "dx_diag_node.cc", "dx_diag_node.h", - "gpu_blacklist.cc", - "gpu_blacklist.h", + "gpu_blocklist.cc", + "gpu_blocklist.h", "gpu_control_list.cc", "gpu_control_list.h", "gpu_crash_keys.cc", @@ -157,6 +157,7 @@ jumbo_source_set("config_sources") { "//base", "//build:branding_buildflags", "//gpu/ipc/common:gpu_preferences_interface", + "//gpu/vulkan:buildflags", "//media:media_buildflags", "//third_party/re2", "//ui/gl", diff --git a/chromium/gpu/config/gpu_blacklist.cc b/chromium/gpu/config/gpu_blocklist.cc index 66eebdd1a16..7fb9cf5042f 100644 --- a/chromium/gpu/config/gpu_blacklist.cc +++ b/chromium/gpu/config/gpu_blocklist.cc @@ -2,29 +2,29 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gpu/config/gpu_blacklist.h" +#include "gpu/config/gpu_blocklist.h" #include "gpu/config/gpu_feature_type.h" #include "gpu/config/software_rendering_list_autogen.h" namespace gpu { -GpuBlacklist::GpuBlacklist(const GpuControlListData& data) +GpuBlocklist::GpuBlocklist(const GpuControlListData& data) : GpuControlList(data) {} -GpuBlacklist::~GpuBlacklist() = default; +GpuBlocklist::~GpuBlocklist() = default; // static -std::unique_ptr<GpuBlacklist> GpuBlacklist::Create() { +std::unique_ptr<GpuBlocklist> GpuBlocklist::Create() { GpuControlListData data(kSoftwareRenderingListEntryCount, kSoftwareRenderingListEntries); return Create(data); } // static -std::unique_ptr<GpuBlacklist> GpuBlacklist::Create( +std::unique_ptr<GpuBlocklist> GpuBlocklist::Create( const GpuControlListData& data) { - std::unique_ptr<GpuBlacklist> list(new GpuBlacklist(data)); + std::unique_ptr<GpuBlocklist> list(new GpuBlocklist(data)); list->AddSupportedFeature("accelerated_2d_canvas", GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS); list->AddSupportedFeature("gpu_compositing", @@ -48,11 +48,12 @@ std::unique_ptr<GpuBlacklist> GpuBlacklist::Create( list->AddSupportedFeature("android_surface_control", GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL); list->AddSupportedFeature("metal", GPU_FEATURE_TYPE_METAL); + list->AddSupportedFeature("vulkan", GPU_FEATURE_TYPE_VULKAN); return list; } // static -bool GpuBlacklist::AreEntryIndicesValid( +bool GpuBlocklist::AreEntryIndicesValid( const std::vector<uint32_t>& entry_indices) { return GpuControlList::AreEntryIndicesValid(entry_indices, kSoftwareRenderingListEntryCount); diff --git a/chromium/gpu/config/gpu_blacklist.h b/chromium/gpu/config/gpu_blocklist.h index db0e2b30d1d..f5ba03f06a8 100644 --- a/chromium/gpu/config/gpu_blacklist.h +++ b/chromium/gpu/config/gpu_blocklist.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef GPU_CONFIG_GPU_BLACKLIST_H_ -#define GPU_CONFIG_GPU_BLACKLIST_H_ +#ifndef GPU_CONFIG_GPU_BLOCKLIST_H_ +#define GPU_CONFIG_GPU_BLOCKLIST_H_ #include <memory> @@ -12,21 +12,21 @@ namespace gpu { -class GPU_EXPORT GpuBlacklist : public GpuControlList { +class GPU_EXPORT GpuBlocklist : public GpuControlList { public: - ~GpuBlacklist() override; + ~GpuBlocklist() override; - static std::unique_ptr<GpuBlacklist> Create(); - static std::unique_ptr<GpuBlacklist> Create(const GpuControlListData& data); + static std::unique_ptr<GpuBlocklist> Create(); + static std::unique_ptr<GpuBlocklist> Create(const GpuControlListData& data); static bool AreEntryIndicesValid(const std::vector<uint32_t>& entry_indices); private: - explicit GpuBlacklist(const GpuControlListData& data); + explicit GpuBlocklist(const GpuControlListData& data); - DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); + DISALLOW_COPY_AND_ASSIGN(GpuBlocklist); }; } // namespace gpu -#endif // GPU_CONFIG_GPU_BLACKLIST_H_ +#endif // GPU_CONFIG_GPU_BLOCKLIST_H_ diff --git a/chromium/gpu/config/gpu_blacklist_unittest.cc b/chromium/gpu/config/gpu_blocklist_unittest.cc index 5e0d43483ce..ff2264eb48b 100644 --- a/chromium/gpu/config/gpu_blacklist_unittest.cc +++ b/chromium/gpu/config/gpu_blocklist_unittest.cc @@ -4,21 +4,19 @@ #include <vector> -#include "gpu/config/gpu_blacklist.h" +#include "gpu/config/gpu_blocklist.h" #include "gpu/config/gpu_feature_type.h" #include "gpu/config/gpu_info.h" #include "testing/gtest/include/gtest/gtest.h" namespace gpu { -class GpuBlacklistTest : public testing::Test { +class GpuBlocklistTest : public testing::Test { public: - GpuBlacklistTest() = default; - ~GpuBlacklistTest() override = default; + GpuBlocklistTest() = default; + ~GpuBlocklistTest() override = default; - const GPUInfo& gpu_info() const { - return gpu_info_; - } + const GPUInfo& gpu_info() const { return gpu_info_; } void RunFeatureTest(GpuFeatureType feature_type) { const int kFeatureListForEntry1[1] = {feature_type}; @@ -49,16 +47,16 @@ class GpuBlacklistTest : public testing::Test { 0, // gpu_series size nullptr, // gpu_series {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, - nullptr, nullptr}, // intel_gpu_generation - nullptr, // more conditions + nullptr, nullptr}, // intel_gpu_generation + nullptr, // more conditions }, 0, // exceptions count nullptr, // exceptions }}; GpuControlListData data(1, kTestEntries); - std::unique_ptr<GpuBlacklist> blacklist = GpuBlacklist::Create(data); + std::unique_ptr<GpuBlocklist> blacklist = GpuBlocklist::Create(data); std::set<int> type = - blacklist->MakeDecision(GpuBlacklist::kOsMacosx, "10.12.3", gpu_info()); + blacklist->MakeDecision(GpuBlocklist::kOsMacosx, "10.12.3", gpu_info()); EXPECT_EQ(1u, type.size()); EXPECT_EQ(1u, type.count(feature_type)); } @@ -79,45 +77,40 @@ class GpuBlacklistTest : public testing::Test { GPUInfo gpu_info_; }; -#define GPU_BLACKLIST_FEATURE_TEST(test_name, feature_type) \ - TEST_F(GpuBlacklistTest, test_name) { RunFeatureTest(feature_type); } +#define GPU_BLOCKLIST_FEATURE_TEST(test_name, feature_type) \ + TEST_F(GpuBlocklistTest, test_name) { RunFeatureTest(feature_type); } -GPU_BLACKLIST_FEATURE_TEST(Accelerated2DCanvas, +GPU_BLOCKLIST_FEATURE_TEST(Accelerated2DCanvas, GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) -GPU_BLACKLIST_FEATURE_TEST(GpuCompositing, - GPU_FEATURE_TYPE_GPU_COMPOSITING) +GPU_BLOCKLIST_FEATURE_TEST(GpuCompositing, GPU_FEATURE_TYPE_GPU_COMPOSITING) -GPU_BLACKLIST_FEATURE_TEST(AcceleratedWebGL, GPU_FEATURE_TYPE_ACCELERATED_WEBGL) +GPU_BLOCKLIST_FEATURE_TEST(AcceleratedWebGL, GPU_FEATURE_TYPE_ACCELERATED_WEBGL) -GPU_BLACKLIST_FEATURE_TEST(Flash3D, - GPU_FEATURE_TYPE_FLASH3D) +GPU_BLOCKLIST_FEATURE_TEST(Flash3D, GPU_FEATURE_TYPE_FLASH3D) -GPU_BLACKLIST_FEATURE_TEST(FlashStage3D, - GPU_FEATURE_TYPE_FLASH_STAGE3D) +GPU_BLOCKLIST_FEATURE_TEST(FlashStage3D, GPU_FEATURE_TYPE_FLASH_STAGE3D) -GPU_BLACKLIST_FEATURE_TEST(FlashStage3DBaseline, +GPU_BLOCKLIST_FEATURE_TEST(FlashStage3DBaseline, GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE) -GPU_BLACKLIST_FEATURE_TEST(AcceleratedVideoDecode, +GPU_BLOCKLIST_FEATURE_TEST(AcceleratedVideoDecode, GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) -GPU_BLACKLIST_FEATURE_TEST(GpuRasterization, - GPU_FEATURE_TYPE_GPU_RASTERIZATION) +GPU_BLOCKLIST_FEATURE_TEST(GpuRasterization, GPU_FEATURE_TYPE_GPU_RASTERIZATION) -GPU_BLACKLIST_FEATURE_TEST(OOPRasterization, GPU_FEATURE_TYPE_OOP_RASTERIZATION) +GPU_BLOCKLIST_FEATURE_TEST(OOPRasterization, GPU_FEATURE_TYPE_OOP_RASTERIZATION) -GPU_BLACKLIST_FEATURE_TEST(WebGL2, - GPU_FEATURE_TYPE_ACCELERATED_WEBGL2) +GPU_BLOCKLIST_FEATURE_TEST(WebGL2, GPU_FEATURE_TYPE_ACCELERATED_WEBGL2) -GPU_BLACKLIST_FEATURE_TEST(ProtectedVideoDecode, +GPU_BLOCKLIST_FEATURE_TEST(ProtectedVideoDecode, GPU_FEATURE_TYPE_PROTECTED_VIDEO_DECODE) // Test for invariant "Assume the newly last added entry has the largest ID". // See GpuControlList::GpuControlList. // It checks software_rendering_list.json -TEST_F(GpuBlacklistTest, TestBlacklistIsValid) { - std::unique_ptr<GpuBlacklist> list(GpuBlacklist::Create()); +TEST_F(GpuBlocklistTest, TestBlocklistIsValid) { + std::unique_ptr<GpuBlocklist> list(GpuBlocklist::Create()); uint32_t max_entry_id = list->max_entry_id(); std::vector<uint32_t> indices(list->num_entries()); diff --git a/chromium/gpu/config/gpu_crash_keys.cc b/chromium/gpu/config/gpu_crash_keys.cc index 5650578cb9c..4641a8d45ac 100644 --- a/chromium/gpu/config/gpu_crash_keys.cc +++ b/chromium/gpu/config/gpu_crash_keys.cc @@ -10,7 +10,11 @@ namespace crash_keys { #if !defined(OS_ANDROID) crash_reporter::CrashKeyString<16> gpu_vendor_id("gpu-venid"); crash_reporter::CrashKeyString<16> gpu_device_id("gpu-devid"); -#endif +#endif // !OS_ANDROID +#if defined(OS_WIN) +crash_reporter::CrashKeyString<16> gpu_sub_sys_id("gpu-subid"); +crash_reporter::CrashKeyString<16> gpu_revision("gpu-rev"); +#endif // OS_WIN crash_reporter::CrashKeyString<64> gpu_driver_version("gpu-driver"); crash_reporter::CrashKeyString<16> gpu_pixel_shader_version("gpu-psver"); crash_reporter::CrashKeyString<16> gpu_vertex_shader_version("gpu-vsver"); diff --git a/chromium/gpu/config/gpu_crash_keys.h b/chromium/gpu/config/gpu_crash_keys.h index 3bceaa16e5e..0de896df550 100644 --- a/chromium/gpu/config/gpu_crash_keys.h +++ b/chromium/gpu/config/gpu_crash_keys.h @@ -16,7 +16,11 @@ namespace crash_keys { #if !defined(OS_ANDROID) extern GPU_EXPORT crash_reporter::CrashKeyString<16> gpu_vendor_id; extern GPU_EXPORT crash_reporter::CrashKeyString<16> gpu_device_id; -#endif +#endif // !OS_ANDROID +#if defined(OS_WIN) +extern GPU_EXPORT crash_reporter::CrashKeyString<16> gpu_sub_sys_id; +extern GPU_EXPORT crash_reporter::CrashKeyString<16> gpu_revision; +#endif // OS_WIN extern GPU_EXPORT crash_reporter::CrashKeyString<64> gpu_driver_version; extern GPU_EXPORT crash_reporter::CrashKeyString<16> gpu_pixel_shader_version; extern GPU_EXPORT crash_reporter::CrashKeyString<16> gpu_vertex_shader_version; diff --git a/chromium/gpu/config/gpu_driver_bug_list.json b/chromium/gpu/config/gpu_driver_bug_list.json index 1ab33b0f547..75bf27f8502 100644 --- a/chromium/gpu/config/gpu_driver_bug_list.json +++ b/chromium/gpu/config/gpu_driver_bug_list.json @@ -170,10 +170,10 @@ }, { "id": 31, - "cr_bugs": [154715, 10068, 269829, 294779, 285292], - "description": "The Mali-Txxx driver does not guarantee flush ordering", + "cr_bugs": [154715, 10068, 269829, 294779, 285292, 1018528], + "description": "The Mali-3xx/4xx/Txxx driver does not guarantee flush ordering", "gl_vendor": "ARM.*", - "gl_renderer": "Mali-T.*", + "gl_renderer": "Mali-[T34].*", "features": [ "use_virtualized_gl_contexts" ] @@ -808,19 +808,6 @@ ] }, { - "id": 101, - "description": "The Mali-Txxx driver hangs when reading from currently displayed buffer", - "cr_bugs": [457511], - "os": { - "type": "chromeos" - }, - "gl_vendor": "ARM.*", - "gl_renderer": "Mali-T.*", - "features": [ - "disable_non_empty_post_sub_buffers_for_onscreen_surfaces" - ] - }, - { "id": 102, "description": "Adreno 420 driver loses FBO attachment contents on bound FBO deletion", "cr_bugs": [457027], @@ -3034,7 +3021,7 @@ }, { "id": 285, - "cr_bugs": [914976], + "cr_bugs": [914976, 1000113], "description": "Context flush ordering doesn't seem to work on AMD", "vendor_id": "0x1002", "os": { @@ -3042,6 +3029,15 @@ }, "features": [ "use_virtualized_gl_contexts" + ], + "exceptions": [ + { + "driver_vendor": "Mesa", + "driver_version": { + "op": ">=", + "value": "19.0" + } + } ] }, { @@ -3179,22 +3175,6 @@ ] }, { - "id": 298, - "cr_bugs": [941716], - "description": "AImageReader is very crashy on this driver version", - "os": { - "type" : "android" - }, - "gl_vendor": "Qualcomm.*", - "driver_version": { - "op": "=", - "value": "269.0" - }, - "features": [ - "disable_aimagereader" - ] - }, - { "id": 299, "description": "Context lost recovery often fails on PowerVR Rogue GE8* GPUs on Android.", "cr_bugs": [942106], @@ -3339,6 +3319,18 @@ }, { "id": 311, + "cr_bugs": [998038], + "description": "Don't use IOSurface backed GMBs for half float textures with swiftshader", + "os": { + "type" : "macosx" + }, + "gl_renderer": "Google SwiftShader*", + "features": [ + "disable_half_float_for_gmb" + ] + }, + { + "id": 312, "cr_bugs": [991869], "description": "Crash on Mali-T8x when using glTexImage2D", "os": { @@ -3373,6 +3365,15 @@ "disabled_extensions": [ "GL_EXT_shader_framebuffer_fetch" ] - } + }, + { + "id": 315, + "cr_bugs": [964010], + "description": "Disable GL_MESA_framebuffer_flip_y for desktop GL", + "gl_type": "gl", + "disabled_extensions": [ + "GL_MESA_framebuffer_flip_y" + ] + } ] } diff --git a/chromium/gpu/config/gpu_extra_info.h b/chromium/gpu/config/gpu_extra_info.h index 7c0f1432779..39bce1eab21 100644 --- a/chromium/gpu/config/gpu_extra_info.h +++ b/chromium/gpu/config/gpu_extra_info.h @@ -35,6 +35,9 @@ struct GPU_EXPORT ANGLEFeature { // Status, can be "enabled" or "disabled". std::string status; + + // Condition, contains the condition that set 'status'. + std::string condition; }; using ANGLEFeatures = std::vector<ANGLEFeature>; diff --git a/chromium/gpu/config/gpu_feature_info.cc b/chromium/gpu/config/gpu_feature_info.cc index acc6224b333..52d65772dcc 100644 --- a/chromium/gpu/config/gpu_feature_info.cc +++ b/chromium/gpu/config/gpu_feature_info.cc @@ -6,7 +6,7 @@ #include <algorithm> -#include "gpu/config/gpu_blacklist.h" +#include "gpu/config/gpu_blocklist.h" #include "gpu/config/gpu_driver_bug_list.h" #include "gpu/config/gpu_driver_bug_workaround_type.h" #include "ui/gl/gl_context.h" diff --git a/chromium/gpu/config/gpu_feature_type.h b/chromium/gpu/config/gpu_feature_type.h index 5ac3ab5c4f8..deaa886ce4d 100644 --- a/chromium/gpu/config/gpu_feature_type.h +++ b/chromium/gpu/config/gpu_feature_type.h @@ -24,6 +24,7 @@ enum GpuFeatureType { GPU_FEATURE_TYPE_OOP_RASTERIZATION, GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL, GPU_FEATURE_TYPE_METAL, + GPU_FEATURE_TYPE_VULKAN, NUMBER_OF_GPU_FEATURE_TYPES }; diff --git a/chromium/gpu/config/gpu_finch_features.cc b/chromium/gpu/config/gpu_finch_features.cc index 68832b35755..ddb2ed78da4 100644 --- a/chromium/gpu/config/gpu_finch_features.cc +++ b/chromium/gpu/config/gpu_finch_features.cc @@ -37,7 +37,7 @@ const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer", // and using overlays on Android. // Note that the feature only works with VizDisplayCompositor enabled. const base::Feature kAndroidSurfaceControl{"AndroidSurfaceControl", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; #endif // Enable GPU Rasterization by default. This can still be overridden by @@ -120,6 +120,10 @@ const base::Feature kVaapiJpegImageDecodeAcceleration{ const base::Feature kVaapiWebPImageDecodeAcceleration{ "VaapiWebPImageDecodeAcceleration", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enable Vulkan graphics backend if --use-vulkan flag is not used. Otherwise +// --use-vulkan will be followed. +const base::Feature kVulkan{"Vulkan", base::FEATURE_DISABLED_BY_DEFAULT}; + #if defined(OS_ANDROID) bool IsAndroidSurfaceControlEnabled() { if (!gl::SurfaceControl::IsSupported()) diff --git a/chromium/gpu/config/gpu_finch_features.h b/chromium/gpu/config/gpu_finch_features.h index 3a4524d0ad1..ed12b079d11 100644 --- a/chromium/gpu/config/gpu_finch_features.h +++ b/chromium/gpu/config/gpu_finch_features.h @@ -50,6 +50,8 @@ GPU_EXPORT extern const base::Feature kVaapiJpegImageDecodeAcceleration; GPU_EXPORT extern const base::Feature kVaapiWebPImageDecodeAcceleration; +GPU_EXPORT extern const base::Feature kVulkan; + #if defined(OS_ANDROID) GPU_EXPORT bool IsAndroidSurfaceControlEnabled(); #endif diff --git a/chromium/gpu/config/gpu_info.cc b/chromium/gpu/config/gpu_info.cc index 56c61fbcee5..91cf6c1090e 100644 --- a/chromium/gpu/config/gpu_info.cc +++ b/chromium/gpu/config/gpu_info.cc @@ -5,6 +5,7 @@ #include <stdint.h> #include "gpu/config/gpu_info.h" +#include "gpu/config/gpu_util.h" namespace { @@ -13,6 +14,10 @@ void EnumerateGPUDevice(const gpu::GPUInfo::GPUDevice& device, enumerator->BeginGPUDevice(); enumerator->AddInt("vendorId", device.vendor_id); enumerator->AddInt("deviceId", device.device_id); +#if defined(OS_WIN) + enumerator->AddInt("subSysId", device.sub_sys_id); + enumerator->AddInt("revision", device.revision); +#endif // OS_WIN enumerator->AddBool("active", device.active); enumerator->AddString("vendorString", device.vendor_string); enumerator->AddString("deviceString", device.device_string); @@ -41,6 +46,8 @@ void EnumerateVideoEncodeAcceleratorSupportedProfile( gpu::GPUInfo::Enumerator* enumerator) { enumerator->BeginVideoEncodeAcceleratorSupportedProfile(); enumerator->AddInt("profile", profile.profile); + enumerator->AddInt("minResolutionWidth", profile.min_resolution.width()); + enumerator->AddInt("minResolutionHeight", profile.min_resolution.height()); enumerator->AddInt("maxResolutionWidth", profile.max_resolution.width()); enumerator->AddInt("maxResolutionHeight", profile.max_resolution.height()); enumerator->AddInt("maxFramerateNumerator", profile.max_framerate_numerator); @@ -102,9 +109,10 @@ void EnumerateDx12VulkanVersionInfo(const gpu::Dx12VulkanVersionInfo& info, enumerator->BeginDx12VulkanVersionInfo(); enumerator->AddBool("supportsDx12", info.supports_dx12); enumerator->AddBool("supportsVulkan", info.supports_vulkan); - enumerator->AddInt("dx12FeatureLevel", - static_cast<int>(info.d3d12_feature_level)); - enumerator->AddInt("vulkanVersion", static_cast<int>(info.vulkan_version)); + enumerator->AddString("dx12FeatureLevel", + gpu::D3DFeatureLevelToString(info.d3d12_feature_level)); + enumerator->AddString("vulkanVersion", + gpu::VulkanVersionToString(info.vulkan_version)); enumerator->EndDx12VulkanVersionInfo(); } #endif @@ -153,11 +161,7 @@ operator=(const ImageDecodeAcceleratorSupportedProfile& other) = default; ImageDecodeAcceleratorSupportedProfile& ImageDecodeAcceleratorSupportedProfile:: operator=(ImageDecodeAcceleratorSupportedProfile&& other) = default; -GPUInfo::GPUDevice::GPUDevice() - : vendor_id(0), - device_id(0), - active(false), - cuda_compute_capability_major(0) {} +GPUInfo::GPUDevice::GPUDevice() = default; GPUInfo::GPUDevice::GPUDevice(const GPUInfo::GPUDevice& other) = default; diff --git a/chromium/gpu/config/gpu_info.h b/chromium/gpu/config/gpu_info.h index e032a312602..720fdc8d866 100644 --- a/chromium/gpu/config/gpu_info.h +++ b/chromium/gpu/config/gpu_info.h @@ -114,6 +114,7 @@ struct GPU_EXPORT VideoDecodeAcceleratorCapabilities { // Specification of an encoding profile supported by a hardware encoder. struct GPU_EXPORT VideoEncodeAcceleratorSupportedProfile { VideoCodecProfile profile; + gfx::Size min_resolution; gfx::Size max_resolution; uint32_t max_framerate_numerator; uint32_t max_framerate_denominator; @@ -194,15 +195,24 @@ struct GPU_EXPORT GPUInfo { GPUDevice& operator=(GPUDevice&& other) noexcept; // The DWORD (uint32_t) representing the graphics card vendor id. - uint32_t vendor_id; + uint32_t vendor_id = 0u; // The DWORD (uint32_t) representing the graphics card device id. // Device ids are unique to vendor, not to one another. - uint32_t device_id; + uint32_t device_id = 0u; + +#if defined(OS_WIN) + // The graphics card subsystem id. + // The lower 16 bits represents the subsystem vendor id. + uint32_t sub_sys_id = 0u; + + // The graphics card revision number. + uint32_t revision = 0u; +#endif // OS_WIN // Whether this GPU is the currently used one. // Currently this field is only supported and meaningful on OS X. - bool active; + bool active = false; // The strings that describe the GPU. // In Linux these strings are obtained through libpci. @@ -216,7 +226,7 @@ struct GPU_EXPORT GPUInfo { // NVIDIA CUDA compute capability, major version. 0 if undetermined. Can be // used to determine the hardware generation that the GPU belongs to. - int cuda_compute_capability_major; + int cuda_compute_capability_major = 0; }; GPUInfo(); diff --git a/chromium/gpu/config/gpu_info_collector.cc b/chromium/gpu/config/gpu_info_collector.cc index dcfe740c186..cdc50836c75 100644 --- a/chromium/gpu/config/gpu_info_collector.cc +++ b/chromium/gpu/config/gpu_info_collector.cc @@ -51,6 +51,7 @@ namespace { #define EGL_FEATURE_COUNT_ANGLE 0x3465 #define EGL_FEATURE_OVERRIDES_ENABLED_ANGLE 0x3466 #define EGL_FEATURE_OVERRIDES_DISABLED_ANGLE 0x3467 +#define EGL_FEATURE_CONDITION_ANGLE 0x3468 #endif /* EGL_ANGLE_feature_control */ scoped_refptr<gl::GLSurface> InitializeGLSurface() { @@ -422,6 +423,8 @@ bool CollectGpuExtraInfo(GpuExtraInfo* gpu_extra_info) { QueryEGLStringi(display, EGL_FEATURE_BUG_ANGLE, i); gpu_extra_info->angle_features[i].status = QueryEGLStringi(display, EGL_FEATURE_STATUS_ANGLE, i); + gpu_extra_info->angle_features[i].condition = + QueryEGLStringi(display, EGL_FEATURE_CONDITION_ANGLE, i); } } diff --git a/chromium/gpu/config/gpu_info_collector_win.cc b/chromium/gpu/config/gpu_info_collector_win.cc index 65feab82637..b7ff063de6a 100644 --- a/chromium/gpu/config/gpu_info_collector_win.cc +++ b/chromium/gpu/config/gpu_info_collector_win.cc @@ -106,7 +106,7 @@ bool CollectDriverInfoD3D(GPUInfo* gpu_info) { TRACE_EVENT0("gpu", "CollectDriverInfoD3D"); Microsoft::WRL::ComPtr<IDXGIFactory> dxgi_factory; - const HRESULT hr = ::CreateDXGIFactory(IID_PPV_ARGS(&dxgi_factory)); + HRESULT hr = ::CreateDXGIFactory(IID_PPV_ARGS(&dxgi_factory)); if (FAILED(hr)) return false; @@ -123,10 +123,12 @@ bool CollectDriverInfoD3D(GPUInfo* gpu_info) { GPUInfo::GPUDevice device; device.vendor_id = desc.VendorId; device.device_id = desc.DeviceId; + device.sub_sys_id = desc.SubSysId; + device.revision = desc.Revision; LARGE_INTEGER umd_version; - const HRESULT hr = dxgi_adapter->CheckInterfaceSupport( - __uuidof(IDXGIDevice), &umd_version); + hr = dxgi_adapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), + &umd_version); if (SUCCEEDED(hr)) { device.driver_version = base::StringPrintf( "%d.%d.%d.%d", HIWORD(umd_version.HighPart), @@ -227,21 +229,13 @@ bool BadAMDVulkanDriverVersion() { return false; } - const VS_FIXEDFILEINFO* fixed_file_info = - file_version_info->fixed_file_info(); - const int major = HIWORD(fixed_file_info->dwFileVersionMS); - const int minor = LOWORD(fixed_file_info->dwFileVersionMS); - const int minor_1 = HIWORD(fixed_file_info->dwFileVersionLS); - // From the Canary crash logs, the broken amdvlk64.dll versions // are 1.0.39.0, 1.0.51.0 and 1.0.54.0. In the manual test, version // 9.2.10.1 dated 12/6/2017 works and version 1.0.54.0 dated 11/2/1017 // crashes. All version numbers small than 1.0.54.0 will be marked as // broken. - if (major == 1 && minor == 0 && minor_1 <= 54) { - return true; - } - return false; + const base::Version kBadAMDVulkanDriverVersion("1.0.54.0"); + return file_version_info->GetFileVersion() <= kBadAMDVulkanDriverVersion; } bool BadVulkanDllVersion() { @@ -251,13 +245,6 @@ bool BadVulkanDllVersion() { if (!file_version_info) return false; - const VS_FIXEDFILEINFO* fixed_file_info = - file_version_info->fixed_file_info(); - const int major = HIWORD(fixed_file_info->dwFileVersionMS); - const int minor = LOWORD(fixed_file_info->dwFileVersionMS); - const int build_1 = HIWORD(fixed_file_info->dwFileVersionLS); - const int build_2 = LOWORD(fixed_file_info->dwFileVersionLS); - // From the logs, most vulkan-1.dll crashs are from the following versions. // As of 7/23/2018. // 0.0.0.0 - # of crashes: 6556 @@ -269,13 +256,12 @@ bool BadVulkanDllVersion() { // The GPU could be from any vendor, but only some certain models would crash. // For those that don't crash, they usually return failures upon GPU vulkan // support querying even though the GPU drivers can support it. - if ((major == 0 && minor == 0 && build_1 == 0 && build_2 == 0) || - (major == 1 && minor == 0 && build_1 == 26 && build_2 == 0) || - (major == 1 && minor == 0 && build_1 == 33 && build_2 == 0) || - (major == 1 && minor == 0 && build_1 == 42 && build_2 == 0) || - (major == 1 && minor == 0 && build_1 == 42 && build_2 == 1) || - (major == 1 && minor == 0 && build_1 == 51 && build_2 == 0)) { - return true; + base::Version fv = file_version_info->GetFileVersion(); + const char* const kBadVulkanDllVersion[] = { + "0.0.0.0", "1.0.26.0", "1.0.33.0", "1.0.42.0", "1.0.42.1", "1.0.51.0"}; + for (const char* bad_version : kBadVulkanDllVersion) { + if (fv == base::Version(bad_version)) + return true; } return false; } diff --git a/chromium/gpu/config/gpu_lists_version.h b/chromium/gpu/config/gpu_lists_version.h index b894576b31f..c0781d029c3 100644 --- a/chromium/gpu/config/gpu_lists_version.h +++ b/chromium/gpu/config/gpu_lists_version.h @@ -3,6 +3,6 @@ #ifndef GPU_CONFIG_GPU_LISTS_VERSION_H_ #define GPU_CONFIG_GPU_LISTS_VERSION_H_ -#define GPU_LISTS_VERSION "c1109b707b1eda5d98eb2ed6bd74083bc352f482" +#define GPU_LISTS_VERSION "cd3a886c28f57603dea2a9050d2aadef3e8c30a4" #endif // GPU_CONFIG_GPU_LISTS_VERSION_H_ diff --git a/chromium/gpu/config/gpu_preferences.h b/chromium/gpu/config/gpu_preferences.h index 49f6724bc6b..656b72c0c13 100644 --- a/chromium/gpu/config/gpu_preferences.h +++ b/chromium/gpu/config/gpu_preferences.h @@ -29,10 +29,11 @@ const size_t kDefaultMaxProgramCacheMemoryBytes = 2 * 1024 * 1024; const size_t kLowEndMaxProgramCacheMemoryBytes = 128 * 1024; #endif -enum VulkanImplementationName : uint32_t { +enum class VulkanImplementationName : uint32_t { kNone = 0, kNative = 1, - kSwiftshader = 2, + kForcedNative = 2, // Cannot override by GPU blacklist. + kSwiftshader = 3, kLast = kSwiftshader, }; diff --git a/chromium/gpu/config/gpu_util.cc b/chromium/gpu/config/gpu_util.cc index 51ea316e92b..235874e7f3b 100644 --- a/chromium/gpu/config/gpu_util.cc +++ b/chromium/gpu/config/gpu_util.cc @@ -14,7 +14,7 @@ #include "base/strings/string_split.h" #include "base/strings/stringprintf.h" #include "build/build_config.h" -#include "gpu/config/gpu_blacklist.h" +#include "gpu/config/gpu_blocklist.h" #include "gpu/config/gpu_crash_keys.h" #include "gpu/config/gpu_driver_bug_list.h" #include "gpu/config/gpu_driver_bug_workaround_type.h" @@ -24,6 +24,7 @@ #include "gpu/config/gpu_info_collector.h" #include "gpu/config/gpu_preferences.h" #include "gpu/config/gpu_switches.h" +#include "gpu/vulkan/buildflags.h" #include "ui/gfx/extension_set.h" #include "ui/gl/buildflags.h" #include "ui/gl/gl_switches.h" @@ -72,6 +73,24 @@ GpuFeatureStatus GetMetalFeatureStatus( #endif } +GpuFeatureStatus GetVulkanFeatureStatus( + const std::set<int>& blacklisted_features, + const GpuPreferences& gpu_preferences) { +#if BUILDFLAG(ENABLE_VULKAN) + // Only blacklist native vulkan. + if (gpu_preferences.use_vulkan == VulkanImplementationName::kNative && + blacklisted_features.count(GPU_FEATURE_TYPE_VULKAN)) + return kGpuFeatureStatusBlacklisted; + + if (gpu_preferences.use_vulkan == VulkanImplementationName::kNone) + return kGpuFeatureStatusDisabled; + + return kGpuFeatureStatusEnabled; +#else + return kGpuFeatureStatusDisabled; +#endif +} + GpuFeatureStatus GetGpuRasterizationFeatureStatus( const std::set<int>& blacklisted_features, const base::CommandLine& command_line) { @@ -312,6 +331,8 @@ GpuFeatureInfo ComputeGpuFeatureInfoWithHardwareAccelerationDisabled() { kGpuFeatureStatusDisabled; gpu_feature_info.status_values[GPU_FEATURE_TYPE_METAL] = kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_VULKAN] = + kGpuFeatureStatusDisabled; #if DCHECK_IS_ON() for (int ii = 0; ii < NUMBER_OF_GPU_FEATURE_TYPES; ++ii) { DCHECK_NE(kGpuFeatureStatusUndefined, gpu_feature_info.status_values[ii]); @@ -348,6 +369,8 @@ GpuFeatureInfo ComputeGpuFeatureInfoWithNoGpu() { kGpuFeatureStatusDisabled; gpu_feature_info.status_values[GPU_FEATURE_TYPE_METAL] = kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_VULKAN] = + kGpuFeatureStatusDisabled; #if DCHECK_IS_ON() for (int ii = 0; ii < NUMBER_OF_GPU_FEATURE_TYPES; ++ii) { DCHECK_NE(kGpuFeatureStatusUndefined, gpu_feature_info.status_values[ii]); @@ -384,6 +407,8 @@ GpuFeatureInfo ComputeGpuFeatureInfoForSwiftShader() { kGpuFeatureStatusDisabled; gpu_feature_info.status_values[GPU_FEATURE_TYPE_METAL] = kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_VULKAN] = + kGpuFeatureStatusDisabled; #if DCHECK_IS_ON() for (int ii = 0; ii < NUMBER_OF_GPU_FEATURE_TYPES; ++ii) { DCHECK_NE(kGpuFeatureStatusUndefined, gpu_feature_info.status_values[ii]); @@ -416,7 +441,7 @@ GpuFeatureInfo ComputeGpuFeatureInfo(const GPUInfo& gpu_info, std::set<int> blacklisted_features; if (!gpu_preferences.ignore_gpu_blacklist && !command_line->HasSwitch(switches::kUseGpuInTests)) { - std::unique_ptr<GpuBlacklist> list(GpuBlacklist::Create()); + std::unique_ptr<GpuBlocklist> list(GpuBlocklist::Create()); if (gpu_preferences.log_gpu_control_list_decisions) list->EnableControlListLogging("gpu_blacklist"); unsigned target_test_group = 0u; @@ -465,6 +490,8 @@ GpuFeatureInfo ComputeGpuFeatureInfo(const GPUInfo& gpu_info, gpu_preferences); gpu_feature_info.status_values[GPU_FEATURE_TYPE_METAL] = GetMetalFeatureStatus(blacklisted_features, gpu_preferences); + gpu_feature_info.status_values[GPU_FEATURE_TYPE_VULKAN] = + GetVulkanFeatureStatus(blacklisted_features, gpu_preferences); #if DCHECK_IS_ON() for (int ii = 0; ii < NUMBER_OF_GPU_FEATURE_TYPES; ++ii) { DCHECK_NE(kGpuFeatureStatusUndefined, gpu_feature_info.status_values[ii]); @@ -542,7 +569,12 @@ void SetKeysForCrashLogging(const GPUInfo& gpu_info) { base::StringPrintf("0x%04x", active_gpu.vendor_id)); crash_keys::gpu_device_id.Set( base::StringPrintf("0x%04x", active_gpu.device_id)); -#endif +#endif // !OS_ANDROID +#if defined(OS_WIN) + crash_keys::gpu_sub_sys_id.Set( + base::StringPrintf("0x%08x", active_gpu.sub_sys_id)); + crash_keys::gpu_revision.Set(base::StringPrintf("%u", active_gpu.revision)); +#endif // OS_WIN crash_keys::gpu_driver_version.Set(active_gpu.driver_version); crash_keys::gpu_pixel_shader_version.Set(gpu_info.pixel_shader_version); crash_keys::gpu_vertex_shader_version.Set(gpu_info.vertex_shader_version); @@ -755,4 +787,27 @@ std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id) { return ""; } +#if defined(OS_WIN) +std::string D3DFeatureLevelToString(uint32_t d3d_feature_level) { + if (d3d_feature_level == 0) { + return "Not supported"; + } else { + return base::StringPrintf("D3D %d.%d", (d3d_feature_level >> 12) & 0xF, + (d3d_feature_level >> 8) & 0xF); + } +} + +std::string VulkanVersionToString(uint32_t vulkan_version) { + if (vulkan_version == 0) { + return "Not supported"; + } else { + // Vulkan version number VK_MAKE_VERSION(major, minor, patch) + // (((major) << 22) | ((minor) << 12) | (patch)) + return base::StringPrintf( + "Vulkan API %d.%d.%d", (vulkan_version >> 22) & 0x3FF, + (vulkan_version >> 12) & 0x3FF, vulkan_version & 0xFFF); + } +} +#endif // OS_WIN + } // namespace gpu diff --git a/chromium/gpu/config/gpu_util.h b/chromium/gpu/config/gpu_util.h index ebb8299e27a..d1cfed531c9 100644 --- a/chromium/gpu/config/gpu_util.h +++ b/chromium/gpu/config/gpu_util.h @@ -80,6 +80,11 @@ GPU_EXPORT GpuSeriesType GetGpuSeriesType(uint32_t vendor_id, GPU_EXPORT std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id); +#if defined(OS_WIN) +GPU_EXPORT std::string D3DFeatureLevelToString(uint32_t d3d_feature_level); +GPU_EXPORT std::string VulkanVersionToString(uint32_t vulkan_version); +#endif // OS_WIN + } // namespace gpu #endif // GPU_CONFIG_GPU_UTIL_H_ diff --git a/chromium/gpu/config/gpu_workaround_list.txt b/chromium/gpu/config/gpu_workaround_list.txt index 97ebf3b7dd7..5d5beda9b0e 100644 --- a/chromium/gpu/config/gpu_workaround_list.txt +++ b/chromium/gpu/config/gpu_workaround_list.txt @@ -114,4 +114,5 @@ wake_up_gpu_before_drawing use_copyteximage2d_instead_of_readpixels_on_multisampled_textures use_eqaa_storage_samples_2 max_3d_array_texture_size_1024 -prefer_draw_to_copy
\ No newline at end of file +disable_half_float_for_gmb +prefer_draw_to_copy |