| Flutter Impeller |

workarounds_vk.h
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
5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_WORKAROUNDS_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_WORKAROUNDS_VK_H_
7
8 #include "impeller/renderer/backend/vulkan/driver_info_vk.h"
9
10 namespace impeller {
11
12 /// A non-exhaustive set of driver specific workarounds.
13 struct WorkaroundsVK {
14 // Adreno GPUs exhibit terrible performance when primitive
15 // restart is used. This was confirmed up to Adreno 640 (Pixel 4).
16 // Because this feature is fairly marginal, we disable it for _all_
17 // Adreno GPUs until we have an upper bound for this bug.
18 bool slow_primitive_restart_performance = false;
19
20 /// Early 600 series Adreno drivers would deadlock if a command
21 /// buffer submission had too much work attached to it, this
22 /// requires the renderer to split up command buffers that could
23 /// be logically combined.
24 bool batch_submit_command_buffer_timeout = false;
25
26 /// On older 600 Series Adreno the input attachment / self dependency
27 /// cycle for programmable blending is broken.
28 ///
29 /// Also broken on newer PowerVR.
30 bool input_attachment_self_dependency_broken = false;
31
32 /// Almost all Adreno series GPU (from 600 up to 800) have problems
33 /// generating mipmaps, resulting in corruption of the mip levels.
34 /// See:
35 /// * https://github.com/flutter/flutter/issues/160441
36 /// * https://github.com/flutter/flutter/issues/159876
37 /// * https://github.com/flutter/flutter/issues/160587
38 bool broken_mipmap_generation = false;
39 };
40
41 WorkaroundsVK GetWorkaroundsFromDriverInfo(DriverInfoVK& driver_info);
42
43 } // namespace impeller
44
45 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_WORKAROUNDS_VK_H_
impeller::DriverInfoVK
Get information about the Vulkan driver.
Definition: driver_info_vk.h:195
driver_info_vk.h
impeller
Definition: allocation.cc:12
impeller::GetWorkaroundsFromDriverInfo
WorkaroundsVK GetWorkaroundsFromDriverInfo(DriverInfoVK &driver_info)
Definition: workarounds_vk.cc:10
impeller::WorkaroundsVK
A non-exhaustive set of driver specific workarounds.
Definition: workarounds_vk.h:13
impeller::WorkaroundsVK::broken_mipmap_generation
bool broken_mipmap_generation
Definition: workarounds_vk.h:38
impeller::WorkaroundsVK::batch_submit_command_buffer_timeout
bool batch_submit_command_buffer_timeout
Definition: workarounds_vk.h:24
impeller::WorkaroundsVK::slow_primitive_restart_performance
bool slow_primitive_restart_performance
Definition: workarounds_vk.h:18
impeller::WorkaroundsVK::input_attachment_self_dependency_broken
bool input_attachment_self_dependency_broken
Definition: workarounds_vk.h:30