diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-08 13:07:32 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-08 13:40:10 +0000 |
commit | 818d9aed569afd192f6d4f6d9b28b72912df8b93 (patch) | |
tree | fa30cbdffa3e8fdc09dbbe37ffc0a721b40fced1 /chromium/gpu | |
parent | 66a2147d838e293f4a5db7711c8eba4e6faaaf0f (diff) | |
download | qtwebengine-chromium-818d9aed569afd192f6d4f6d9b28b72912df8b93.tar.gz |
BASELINE: Update Chromium to 65.0.3325.151
Change-Id: I3c71dd500483eb29491ac3eee4123714dda52da9
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/gpu')
-rw-r--r-- | chromium/gpu/command_buffer/service/context_state.cc | 34 | ||||
-rw-r--r-- | chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc | 4 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_blacklist_unittest.cc | 2 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_control_list.cc | 13 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_control_list.h | 4 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_control_list_testing_autogen.cc | 132 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_driver_bug_list.json | 44 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_feature_info.h | 2 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_lists_version.h | 2 | ||||
-rw-r--r-- | chromium/gpu/config/gpu_util.cc | 10 | ||||
-rwxr-xr-x | chromium/gpu/config/process_json.py | 26 | ||||
-rw-r--r-- | chromium/gpu/ipc/common/gpu_feature_info.mojom | 3 | ||||
-rw-r--r-- | chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h | 6 | ||||
-rw-r--r-- | chromium/gpu/ipc/service/gpu_channel_manager.cc | 4 |
14 files changed, 267 insertions, 19 deletions
diff --git a/chromium/gpu/command_buffer/service/context_state.cc b/chromium/gpu/command_buffer/service/context_state.cc index 3f9a348428f..324f4613f15 100644 --- a/chromium/gpu/command_buffer/service/context_state.cc +++ b/chromium/gpu/command_buffer/service/context_state.cc @@ -29,6 +29,16 @@ GLuint Get2dServiceId(const TextureUnit& unit) { ? unit.bound_texture_2d->service_id() : 0; } +GLuint Get2dArrayServiceId(const TextureUnit& unit) { + return unit.bound_texture_2d_array.get() + ? unit.bound_texture_2d_array->service_id() + : 0; +} + +GLuint Get3dServiceId(const TextureUnit& unit) { + return unit.bound_texture_3d.get() ? unit.bound_texture_3d->service_id() : 0; +} + GLuint GetCubeServiceId(const TextureUnit& unit) { return unit.bound_texture_cube_map.get() ? unit.bound_texture_cube_map->service_id() : 0; @@ -237,6 +247,8 @@ void ContextState::RestoreTextureUnitBindings( DCHECK_LT(unit, texture_units.size()); const TextureUnit& texture_unit = texture_units[unit]; GLuint service_id_2d = Get2dServiceId(texture_unit); + GLuint service_id_2d_array = Get2dArrayServiceId(texture_unit); + GLuint service_id_3d = Get3dServiceId(texture_unit); GLuint service_id_cube = GetCubeServiceId(texture_unit); GLuint service_id_oes = GetOesServiceId(texture_unit); GLuint service_id_arb = GetArbServiceId(texture_unit); @@ -247,10 +259,22 @@ void ContextState::RestoreTextureUnitBindings( feature_info_->feature_flags().oes_egl_image_external || feature_info_->feature_flags().nv_egl_stream_consumer_external; bool bind_texture_arb = feature_info_->feature_flags().arb_texture_rectangle; + // TEXTURE_2D_ARRAY and TEXTURE_3D are only applicable from ES3 version. + // So set it to FALSE by default. + bool bind_texture_2d_array = false; + bool bind_texture_3d = false; + // set the variables to true only if the application is ES3 or newer + if (feature_info_->IsES3Capable()) { + bind_texture_2d_array = true; + bind_texture_3d = true; + } if (prev_state) { const TextureUnit& prev_unit = prev_state->texture_units[unit]; bind_texture_2d = service_id_2d != Get2dServiceId(prev_unit); + bind_texture_2d_array = + service_id_2d_array != Get2dArrayServiceId(prev_unit); + bind_texture_3d = service_id_3d != Get3dServiceId(prev_unit); bind_texture_cube = service_id_cube != GetCubeServiceId(prev_unit); bind_texture_oes = bind_texture_oes && service_id_oes != GetOesServiceId(prev_unit); @@ -259,8 +283,8 @@ void ContextState::RestoreTextureUnitBindings( } // Early-out if nothing has changed from the previous state. - if (!bind_texture_2d && !bind_texture_cube - && !bind_texture_oes && !bind_texture_arb) { + if (!bind_texture_2d && !bind_texture_2d_array && !bind_texture_3d && + !bind_texture_cube && !bind_texture_oes && !bind_texture_arb) { return; } @@ -277,6 +301,12 @@ void ContextState::RestoreTextureUnitBindings( if (bind_texture_arb) { api()->glBindTextureFn(GL_TEXTURE_RECTANGLE_ARB, service_id_arb); } + if (bind_texture_2d_array) { + api()->glBindTextureFn(GL_TEXTURE_2D_ARRAY, service_id_2d_array); + } + if (bind_texture_3d) { + api()->glBindTextureFn(GL_TEXTURE_3D, service_id_3d); + } } void ContextState::RestoreSamplerBinding(GLuint unit, diff --git a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc index 3765e690cf6..78c18320f5e 100644 --- a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc +++ b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc @@ -418,6 +418,8 @@ TEST_P(GLES2DecoderRestoreStateTest, ES3NullPreviousStateWithSampler) { AddExpectationsForActiveTexture(GL_TEXTURE0); AddExpectationsForBindTexture(GL_TEXTURE_2D, kServiceTextureId); AddExpectationsForBindTexture(GL_TEXTURE_CUBE_MAP, 0); + AddExpectationsForBindTexture(GL_TEXTURE_2D_ARRAY, 0); + AddExpectationsForBindTexture(GL_TEXTURE_3D, 0); // Expect to restore sampler binding for unit GL_TEXTURE0. AddExpectationsForBindSampler(0, kServiceSamplerId); @@ -426,6 +428,8 @@ TEST_P(GLES2DecoderRestoreStateTest, ES3NullPreviousStateWithSampler) { AddExpectationsForActiveTexture(GL_TEXTURE0 + i); AddExpectationsForBindTexture(GL_TEXTURE_2D, 0); AddExpectationsForBindTexture(GL_TEXTURE_CUBE_MAP, 0); + AddExpectationsForBindTexture(GL_TEXTURE_2D_ARRAY, 0); + AddExpectationsForBindTexture(GL_TEXTURE_3D, 0); AddExpectationsForBindSampler(i, 0); } diff --git a/chromium/gpu/config/gpu_blacklist_unittest.cc b/chromium/gpu/config/gpu_blacklist_unittest.cc index 45bfe72cb27..17f2bf80c1c 100644 --- a/chromium/gpu/config/gpu_blacklist_unittest.cc +++ b/chromium/gpu/config/gpu_blacklist_unittest.cc @@ -30,6 +30,8 @@ class GpuBlacklistTest : public testing::Test { kFeatureListForEntry1, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { diff --git a/chromium/gpu/config/gpu_control_list.cc b/chromium/gpu/config/gpu_control_list.cc index a1a29a05c5f..f93c1d21951 100644 --- a/chromium/gpu/config/gpu_control_list.cc +++ b/chromium/gpu/config/gpu_control_list.cc @@ -605,6 +605,19 @@ std::vector<std::string> GpuControlList::GetDisabledExtensions() { disabled_extensions.end()); } +std::vector<std::string> GpuControlList::GetDisabledWebGLExtensions() { + std::set<std::string> disabled_webgl_extensions; + for (auto index : active_entries_) { + DCHECK_LT(index, entry_count_); + const Entry& entry = entries_[index]; + for (size_t ii = 0; ii < entry.disabled_webgl_extension_size; ++ii) { + disabled_webgl_extensions.insert(entry.disabled_webgl_extensions[ii]); + } + } + return std::vector<std::string>(disabled_webgl_extensions.begin(), + disabled_webgl_extensions.end()); +} + void GpuControlList::GetReasons(base::ListValue* problem_list, const std::string& tag, const std::vector<uint32_t>& entries) const { diff --git a/chromium/gpu/config/gpu_control_list.h b/chromium/gpu/config/gpu_control_list.h index de98ea830de..416386d72fe 100644 --- a/chromium/gpu/config/gpu_control_list.h +++ b/chromium/gpu/config/gpu_control_list.h @@ -191,6 +191,8 @@ class GPU_EXPORT GpuControlList { const int* features; size_t disabled_extension_size; const char* const* disabled_extensions; + size_t disabled_webgl_extension_size; + const char* const* disabled_webgl_extensions; size_t cr_bug_size; const uint32_t* cr_bugs; Conditions conditions; @@ -243,6 +245,8 @@ class GPU_EXPORT GpuControlList { // Collects all disabled extensions. std::vector<std::string> GetDisabledExtensions(); + // Collects all disabled WebGL extensions. + std::vector<std::string> GetDisabledWebGLExtensions(); // Returns the description and bugs from active entries provided. // Each problems has: diff --git a/chromium/gpu/config/gpu_control_list_testing_autogen.cc b/chromium/gpu/config/gpu_control_list_testing_autogen.cc index 55257433999..72408aeb7e8 100644 --- a/chromium/gpu/config/gpu_control_list_testing_autogen.cc +++ b/chromium/gpu/config/gpu_control_list_testing_autogen.cc @@ -23,8 +23,10 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry1, // features arraysize(kDisabledExtensionsForEntry1), // DisabledExtensions size kDisabledExtensionsForEntry1, // DisabledExtensions - arraysize(kCrBugsForEntry1), // CrBugs size - kCrBugsForEntry1, // CrBugs + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions + arraysize(kCrBugsForEntry1), // CrBugs size + kCrBugsForEntry1, // CrBugs { GpuControlList::kOsMacosx, // os_type {GpuControlList::kEQ, GpuControlList::kVersionStyleNumerical, @@ -49,6 +51,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry2, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -75,6 +79,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry3, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -101,6 +107,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry4, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -127,6 +135,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry5, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -153,6 +163,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry6, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -179,6 +191,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry7, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -205,6 +219,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry8, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -231,6 +247,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry9, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -257,6 +275,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry10, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -283,6 +303,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry11, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -309,6 +331,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry12, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -335,6 +359,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry13, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -361,6 +387,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry14, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -387,6 +415,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry15, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -413,6 +443,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry16, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -439,6 +471,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry17, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -465,6 +499,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry18, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -491,6 +527,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry19, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -517,6 +555,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry20, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -543,6 +583,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry21, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -569,6 +611,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry22, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -595,6 +639,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry23, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -621,6 +667,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry24, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -647,6 +695,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry25, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -673,6 +723,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry26, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -699,6 +751,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry27, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -725,6 +779,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry28, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -751,6 +807,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry29, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -777,6 +835,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry30, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -803,6 +863,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry31, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -829,6 +891,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry32, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -855,6 +919,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry33, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -881,6 +947,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry34, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -907,6 +975,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry35, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -933,6 +1003,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry36, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -959,6 +1031,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry37, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -985,6 +1059,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry38, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1011,6 +1087,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry39, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1037,6 +1115,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry40, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1063,6 +1143,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry41, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1089,6 +1171,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry42, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1115,6 +1199,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry43, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1141,6 +1227,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry44, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1167,6 +1255,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry45, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1193,6 +1283,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry46, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1220,6 +1312,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry47, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1247,6 +1341,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry48, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1273,6 +1369,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry49, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1299,6 +1397,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry50, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1325,6 +1425,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry51, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1351,6 +1453,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry52, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1377,6 +1481,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry53, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1403,6 +1509,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry54, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1429,8 +1537,10 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { nullptr, // features arraysize(kDisabledExtensionsForEntry55), // DisabledExtensions size kDisabledExtensionsForEntry55, // DisabledExtensions - 0, // CrBugs size - nullptr, // CrBugs + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions + 0, // CrBugs size + nullptr, // CrBugs { GpuControlList::kOsWin, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, @@ -1455,8 +1565,10 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { nullptr, // features arraysize(kDisabledExtensionsForEntry56), // DisabledExtensions size kDisabledExtensionsForEntry56, // DisabledExtensions - 0, // CrBugs size - nullptr, // CrBugs + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions + 0, // CrBugs size + nullptr, // CrBugs { GpuControlList::kOsWin, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, @@ -1481,6 +1593,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry57, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1507,6 +1621,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry58, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1533,6 +1649,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry59, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { @@ -1559,6 +1677,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = { kFeatureListForEntry60, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions + 0, // DisabledWebGLExtensions size + nullptr, // DisabledWebGLExtensions 0, // CrBugs size nullptr, // CrBugs { diff --git a/chromium/gpu/config/gpu_driver_bug_list.json b/chromium/gpu/config/gpu_driver_bug_list.json index ad57eb8ca40..0b1ed081cc6 100644 --- a/chromium/gpu/config/gpu_driver_bug_list.json +++ b/chromium/gpu/config/gpu_driver_bug_list.json @@ -2788,6 +2788,50 @@ "features": [ "max_msaa_sample_count_4" ] + }, + { + "id": 256, + "description": "Don't expose disjoint_timer_query extensions to WebGL", + "cr_bugs": [808744], + "disabled_webgl_extensions": [ + "EXT_disjoint_timer_query", + "EXT_disjoint_timer_query_webgl2" + ] + }, + { + "id": 257, + "description": "Fake entry for testing disabling of WebGL extensions", + "cr_bugs": [808744], + "test_group": 2, + "disabled_webgl_extensions": [ + "WEBGL_lose_context" + ] + }, + { + "id": 258, + "description": "Shader variable initialization in a loop caused perf regression on Mac Intel.", + "cr_bugs": [809422], + "os": { + "type": "macosx" + }, + "vendor_id": "0x8086", + "multi_gpu_category": "any", + "features": [ + "dont_use_loops_to_initialize_variables" + ] + }, + { + "id": 259, + "description": "8x MSAA is slow for alpha:false WebGL contexts on Mac Intel", + "cr_bugs": [812071], + "os": { + "type": "macosx" + }, + "vendor_id": "0x8086", + "multi_gpu_category": "primary", + "features": [ + "max_msaa_sample_count_4" + ] } ] } diff --git a/chromium/gpu/config/gpu_feature_info.h b/chromium/gpu/config/gpu_feature_info.h index f26572d414b..51138ae81b3 100644 --- a/chromium/gpu/config/gpu_feature_info.h +++ b/chromium/gpu/config/gpu_feature_info.h @@ -52,6 +52,8 @@ struct GPU_EXPORT GpuFeatureInfo { std::vector<int32_t> enabled_gpu_driver_bug_workarounds; // Disabled extensions separated by whitespaces. std::string disabled_extensions; + // Disabled WebGL extensions separated by whitespaces. + std::string disabled_webgl_extensions; // Applied gpu blacklist entry indices. std::vector<uint32_t> applied_gpu_blacklist_entries; // Applied gpu driver bug list entry indices. diff --git a/chromium/gpu/config/gpu_lists_version.h b/chromium/gpu/config/gpu_lists_version.h index ad3a5e431c5..3d89bf18a19 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 "a0bb379a4de011b41ea07da28716e685a1cf4579" +#define GPU_LISTS_VERSION "2b81d816997306dfdd0c2168d67028502f1cdee2" #endif // GPU_CONFIG_GPU_LISTS_VERSION_H_ diff --git a/chromium/gpu/config/gpu_util.cc b/chromium/gpu/config/gpu_util.cc index 2d039f3c951..d68eef65ed5 100644 --- a/chromium/gpu/config/gpu_util.cc +++ b/chromium/gpu/config/gpu_util.cc @@ -418,6 +418,16 @@ GpuFeatureInfo ComputeGpuFeatureInfo(const GPUInfo& gpu_info, driver_bug_disabled_extensions = list->GetDisabledExtensions(); all_disabled_extensions.insert(driver_bug_disabled_extensions.begin(), driver_bug_disabled_extensions.end()); + + // Disabling WebGL extensions only occurs via the blacklist, so + // the logic is simpler. + gl::ExtensionSet disabled_webgl_extensions; + std::vector<std::string> disabled_webgl_extension_list = + list->GetDisabledWebGLExtensions(); + disabled_webgl_extensions.insert(disabled_webgl_extension_list.begin(), + disabled_webgl_extension_list.end()); + gpu_feature_info.disabled_webgl_extensions = + gl::MakeExtensionString(disabled_webgl_extensions); } gpu::GpuDriverBugList::AppendWorkaroundsFromCommandLine( &enabled_driver_bug_workarounds, *command_line); diff --git a/chromium/gpu/config/process_json.py b/chromium/gpu/config/process_json.py index bc67ce3bdbc..03910fc36c9 100755 --- a/chromium/gpu/config/process_json.py +++ b/chromium/gpu/config/process_json.py @@ -127,9 +127,10 @@ def write_features(entry_id, feature_set, feature_name_prefix, data_helper_file.write('};\n\n') -def write_disabled_extension_list(entry_id, data, data_file, data_helper_file): +def write_disabled_extension_list(entry_kind, entry_id, data, data_file, + data_helper_file): if data: - var_name = 'kDisabledExtensionsForEntry' + str(entry_id) + var_name = 'k%sForEntry%d' % (entry_kind, entry_id) # define the list data_helper_file.write( 'const char* const %s[%d] = {\n' % (var_name, len(data))) @@ -138,11 +139,11 @@ def write_disabled_extension_list(entry_id, data, data_file, data_helper_file): data_helper_file.write(',\n') data_helper_file.write('};\n\n') # use the list - data_file.write('arraysize(%s), // DisabledExtensions size\n' % var_name) - data_file.write('%s, // DisabledExtensions\n' % var_name) + data_file.write('arraysize(%s), // %s size\n' % (var_name, entry_kind)) + data_file.write('%s, // %s\n' % (var_name, entry_kind)) else: - data_file.write('0, // DisabledExtensions size\n') - data_file.write('nullptr, // DisabledExtensions\n') + data_file.write('0, // %s size\n' % entry_kind) + data_file.write('nullptr, // %s\n' % entry_kind) def write_gl_strings(entry_id, is_exception, exception_id, data, @@ -381,6 +382,9 @@ def write_conditions(entry_id, is_exception, exception_id, entry, elif key == 'disabled_extensions': assert not is_exception continue + elif key == 'disabled_webgl_extensions': + assert not is_exception + continue elif key == 'comment': continue elif key == 'webkit_bugs': @@ -526,10 +530,12 @@ def write_entry(entry, total_feature_set, feature_name_prefix, data_file.write('0, // feature size\n') data_file.write('nullptr, // features\n') # Disabled extensions - disabled_extensions = None - if 'disabled_extensions' in entry: - disabled_extensions = entry['disabled_extensions'] - write_disabled_extension_list(entry_id, disabled_extensions, + write_disabled_extension_list('DisabledExtensions', entry_id, + entry.get('disabled_extensions', None), + data_file, data_helper_file) + # Disabled WebGL extensions + write_disabled_extension_list('DisabledWebGLExtensions', entry_id, + entry.get('disabled_webgl_extensions', None), data_file, data_helper_file) # webkit_bugs are skipped because there is only one entry that has it. # cr_bugs diff --git a/chromium/gpu/ipc/common/gpu_feature_info.mojom b/chromium/gpu/ipc/common/gpu_feature_info.mojom index 72fe15315d6..01cf4e627f9 100644 --- a/chromium/gpu/ipc/common/gpu_feature_info.mojom +++ b/chromium/gpu/ipc/common/gpu_feature_info.mojom @@ -30,6 +30,9 @@ struct GpuFeatureInfo { // GL extensions disabled by GpuDriverBugWorkarounds, separated by ' '. string disabled_extensions; + // WebGL extensions disabled by GpuDriverBugWorkarounds, separated by ' '. + string disabled_webgl_extensions; + // The array contains a list of gpu blacklist entry indices that apply in the // current platform. The entries are defined in // gpu/config/software_rendering_list.json. diff --git a/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h b/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h index 79f959c96b0..c7b0a07b5c8 100644 --- a/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h +++ b/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h @@ -71,6 +71,7 @@ struct StructTraits<gpu::mojom::GpuFeatureInfoDataView, gpu::GpuFeatureInfo> { return data.ReadEnabledGpuDriverBugWorkarounds( &out->enabled_gpu_driver_bug_workarounds) && data.ReadDisabledExtensions(&out->disabled_extensions) && + data.ReadDisabledWebglExtensions(&out->disabled_webgl_extensions) && data.ReadAppliedGpuBlacklistEntries( &out->applied_gpu_blacklist_entries) && gpu::GpuBlacklist::AreEntryIndicesValid( @@ -97,6 +98,11 @@ struct StructTraits<gpu::mojom::GpuFeatureInfoDataView, gpu::GpuFeatureInfo> { return info.disabled_extensions; } + static const std::string& disabled_webgl_extensions( + const gpu::GpuFeatureInfo& info) { + return info.disabled_webgl_extensions; + } + static const std::vector<uint32_t>& applied_gpu_blacklist_entries( const gpu::GpuFeatureInfo& info) { return info.applied_gpu_blacklist_entries; diff --git a/chromium/gpu/ipc/service/gpu_channel_manager.cc b/chromium/gpu/ipc/service/gpu_channel_manager.cc index f8bcb0cce52..15ca2459e40 100644 --- a/chromium/gpu/ipc/service/gpu_channel_manager.cc +++ b/chromium/gpu/ipc/service/gpu_channel_manager.cc @@ -266,6 +266,10 @@ void GpuChannelManager::DoWakeUpGpu() { void GpuChannelManager::OnApplicationStateChange( base::android::ApplicationState state) { + // TODO(ericrk): Temporarily disable the context release logic due to + // https://crbug.com/792120. Re-enable when the fix lands. + return; + if (state != base::android::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES || !is_running_on_low_end_mode_) { return; |