diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-10 22:41:00 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-10 22:41:00 +0000 |
commit | bdba991c95e4fbd364a83112fe6ebbe8640b51be (patch) | |
tree | 07d369254f5237b1f915738b7d81899bfbb3a2fb /gpu | |
parent | 890ac08bb68aff6d4bc2205debba069b5ef4cb59 (diff) | |
download | chromium_src-bdba991c95e4fbd364a83112fe6ebbe8640b51be.zip chromium_src-bdba991c95e4fbd364a83112fe6ebbe8640b51be.tar.gz chromium_src-bdba991c95e4fbd364a83112fe6ebbe8640b51be.tar.bz2 |
Recompute gpu driver bug workarounds at gpu process startup
So we can make decisions based on full gpu_info. This is specifically
useful on chromeos where vendor_id/device_id are unavailable, and we
need gl_vendor/gl_renderer strings to identify a gpu.
BUG=306231
TEST=disable_framebuffer_multisample is on for chromeos with Mali
R=piman@chromium.org
Review URL: https://codereview.chromium.org/111883003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/config/gpu_driver_bug_list_json.cc | 37 | ||||
-rw-r--r-- | gpu/config/gpu_util.cc | 5 | ||||
-rw-r--r-- | gpu/config/gpu_util.h | 7 |
3 files changed, 14 insertions, 35 deletions
diff --git a/gpu/config/gpu_driver_bug_list_json.cc b/gpu/config/gpu_driver_bug_list_json.cc index 5ee9cab..4c0e060 100644 --- a/gpu/config/gpu_driver_bug_list_json.cc +++ b/gpu/config/gpu_driver_bug_list_json.cc @@ -19,7 +19,7 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST( { "name": "gpu driver bug list", // Please update the version number whenever you change this file. - "version": "3.6", + "version": "3.7", "entries": [ { "id": 1, @@ -385,11 +385,8 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST( }, { "id": 31, - "cr_bugs": [154715, 10068, 269829, 294779], + "cr_bugs": [154715, 10068, 269829, 294779, 285292], "description": "The Mali T-6xx driver does not guarantee flush ordering.", - "os": { - "type": "android" - }, "gl_vendor": { "op": "beginwith", "value": "ARM" @@ -610,21 +607,6 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST( ] }, { - "id": 47, - "description": "The Mali T-6xx driver does not guarantee flush ordering.", - "cr_bugs": [285292], - "os": { - "type": "chromeos" - }, - "cpu_info": { - "op": "=", - "value": "ARM" // TODO(piman): change to GL_VENDOR/GL_RENDERER switch - }, - "features": [ - "use_virtualized_gl_contexts" - ] - }, - { "id": 48, "description": "Force to use discrete GPU on older MacBookPro models.", "cr_bugs": [113703], @@ -725,21 +707,6 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST( "features": [ "disable_framebuffer_multisample" ] - }, - { - "id": 54, - "cr_bugs": [321701], - "description": "ES3 multisampling is too slow to be usable on Mali (ChromeOS).", - "os": { - "type": "chromeos" - }, - "cpu_info": { - "op": "=", - "value": "ARM" // TODO(piman): consolidate with id 53 (needs GL_VENDOR/GL_RENDERER parsing support) - }, - "features": [ - "disable_framebuffer_multisample" - ] } ] } diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc index 09495c2..f2c861b 100644 --- a/gpu/config/gpu_util.cc +++ b/gpu/config/gpu_util.cc @@ -57,6 +57,11 @@ void ApplyGpuDriverBugWorkarounds(CommandLine* command_line) { GPUInfo gpu_info; CollectBasicGraphicsInfo(&gpu_info); + ApplyGpuDriverBugWorkarounds(gpu_info, command_line); +} + +void ApplyGpuDriverBugWorkarounds( + const GPUInfo& gpu_info, CommandLine* command_line) { scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create()); list->LoadList(kGpuDriverBugListJson, GpuControlList::kCurrentOsOnly); diff --git a/gpu/config/gpu_util.h b/gpu/config/gpu_util.h index 58e2db0..39aeb20 100644 --- a/gpu/config/gpu_util.h +++ b/gpu/config/gpu_util.h @@ -15,6 +15,8 @@ class CommandLine; namespace gpu { +struct GPUInfo; + // Merge features in src into dst. GPU_EXPORT void MergeFeatureSets( std::set<int>* dst, const std::set<int>& src); @@ -23,6 +25,11 @@ GPU_EXPORT void MergeFeatureSets( // system, and append the |command_line|. GPU_EXPORT void ApplyGpuDriverBugWorkarounds(CommandLine* command_line); +// With provided GPUInfo, compute the driver bug workarounds for the current +// system, and append the |command_line|. +GPU_EXPORT void ApplyGpuDriverBugWorkarounds( + const GPUInfo& gpu_inco, CommandLine* command_line); + // |str| is in the format of "feature1,feature2,...,featureN". GPU_EXPORT void StringToFeatureSet( const std::string& str, std::set<int>* feature_set); |