Flutter Impeller
workarounds_vk.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
7 
8 namespace impeller {
9 
11  WorkaroundsVK workarounds;
12 
13  const auto& adreno_gpu = driver_info.GetAdrenoGPUInfo();
14  const auto& powervr_gpu = driver_info.GetPowerVRGPUInfo();
15 
16  if (adreno_gpu.has_value()) {
17  workarounds.slow_primitive_restart_performance = true;
18  workarounds.broken_mipmap_generation = true;
19 
20  if (adreno_gpu.value() <= AdrenoGPU::kAdreno630) {
21  workarounds.input_attachment_self_dependency_broken = true;
22  workarounds.batch_submit_command_buffer_timeout = true;
23  }
24  } else if (powervr_gpu.has_value()) {
25  workarounds.input_attachment_self_dependency_broken = true;
26  }
27  return workarounds;
28 }
29 
30 } // namespace impeller
Get information about the Vulkan driver.
std::optional< PowerVRGPU > GetPowerVRGPUInfo() const
Returns PowerVR GPU info if this is a PowerVR GPU, otherwise std::nullopt.
std::optional< AdrenoGPU > GetAdrenoGPUInfo() const
Returns Adreno GPU info if this is a Adreno GPU, otherwise std::nullopt.
WorkaroundsVK GetWorkaroundsFromDriverInfo(DriverInfoVK &driver_info)
A non-exhaustive set of driver specific workarounds.
bool input_attachment_self_dependency_broken