Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/include/platform/FrontendFeatures.h
1693 views
1
//
2
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
3
// Use of this source code is governed by a BSD-style license that can be
4
// found in the LICENSE file.
5
//
6
7
// FrontendFeatures.h: Features/workarounds for driver bugs and other behaviors seen
8
// on all platforms.
9
10
#ifndef ANGLE_PLATFORM_FRONTENDFEATURES_H_
11
#define ANGLE_PLATFORM_FRONTENDFEATURES_H_
12
13
#include "platform/Feature.h"
14
15
namespace angle
16
{
17
18
struct FrontendFeatures : angle::FeatureSetBase
19
{
20
FrontendFeatures();
21
~FrontendFeatures();
22
23
// Force the context to be lost (via KHR_robustness) if a GL_OUT_OF_MEMORY error occurs. The
24
// driver may be in an inconsistent state if this happens, and some users of ANGLE rely on this
25
// notification to prevent further execution.
26
angle::Feature loseContextOnOutOfMemory = {
27
"lose_context_on_out_of_memory", angle::FeatureCategory::FrontendWorkarounds,
28
"Some users rely on a lost context notification if a GL_OUT_OF_MEMORY "
29
"error occurs",
30
&members};
31
32
// Program binaries don't contain transform feedback varyings on Qualcomm GPUs.
33
// Work around this by disabling the program cache for programs with transform feedback.
34
angle::Feature disableProgramCachingForTransformFeedback = {
35
"disable_program_caching_for_transform_feedback",
36
angle::FeatureCategory::FrontendWorkarounds,
37
"On some GPUs, program binaries don't contain transform feedback varyings", &members};
38
39
// On Windows Intel OpenGL drivers TexImage sometimes seems to interact with the Framebuffer.
40
// Flaky crashes can occur unless we sync the Framebuffer bindings. The workaround is to add
41
// Framebuffer binding dirty bits to TexImage updates. See http://anglebug.com/2906
42
angle::Feature syncFramebufferBindingsOnTexImage = {
43
"sync_framebuffer_bindings_on_tex_image", angle::FeatureCategory::FrontendWorkarounds,
44
"On some drivers TexImage sometimes seems to interact "
45
"with the Framebuffer",
46
&members};
47
48
angle::Feature scalarizeVecAndMatConstructorArgs = {
49
"scalarize_vec_and_mat_constructor_args", angle::FeatureCategory::FrontendWorkarounds,
50
"Always rewrite vec/mat constructors to be consistent", &members,
51
"http://crbug.com/1165751"};
52
53
// Disable support for GL_OES_get_program_binary
54
angle::Feature disableProgramBinary = {
55
"disable_program_binary", angle::FeatureCategory::FrontendFeatures,
56
"Disable support for GL_OES_get_program_binary", &members, "http://anglebug.com/5007"};
57
58
// Allow disabling of GL_EXT_texture_filter_anisotropic through a runtime feature for
59
// performance comparisons.
60
angle::Feature disableAnisotropicFiltering = {
61
"disable_anisotropic_filtering", angle::FeatureCategory::FrontendWorkarounds,
62
"Disable support for anisotropic filtering", &members};
63
64
// We can use this feature to override compressed format support for portability.
65
angle::Feature allowCompressedFormats = {"allow_compressed_formats",
66
angle::FeatureCategory::FrontendWorkarounds,
67
"Allow compressed formats", &members};
68
69
angle::Feature captureLimits = {"enable_capture_limits",
70
angle::FeatureCategory::FrontendFeatures,
71
"Set the context limits like frame capturing was enabled",
72
&members, "http://anglebug.com/5750"};
73
74
// Whether we should compress pipeline cache in thread pool before it's stored in blob cache.
75
// http://anglebug.com/4722
76
angle::Feature enableCompressingPipelineCacheInThreadPool = {
77
"enableCompressingPipelineCacheInThreadPool", angle::FeatureCategory::FrontendWorkarounds,
78
"Enable compressing pipeline cache in thread pool.", &members, "http://anglebug.com/4722"};
79
80
// Forces on robust resource init. Useful for some tests to avoid undefined values.
81
angle::Feature forceRobustResourceInit = {
82
"forceRobustResourceInit", angle::FeatureCategory::FrontendFeatures,
83
"Force-enable robust resource init", &members, "http://anglebug.com/6041"};
84
85
// Forces on shader variable init to avoid undefined values in tests. This feature is enabled
86
// for WebGL and frame capture, which both require deterministic results.
87
angle::Feature forceInitShaderVariables = {
88
"forceInitShaderVariables", angle::FeatureCategory::FrontendFeatures,
89
"Force-enable shader variable initialization", &members};
90
91
angle::Feature enableProgramBinaryForCapture = {
92
"enableProgramBinaryForCapture", angle::FeatureCategory::FrontendFeatures,
93
"Even if FrameCapture is enabled, enable GL_OES_get_program_binary", &members,
94
"http://anglebug.com/5658"};
95
};
96
97
inline FrontendFeatures::FrontendFeatures() = default;
98
inline FrontendFeatures::~FrontendFeatures() = default;
99
100
} // namespace angle
101
102
#endif // ANGLE_PLATFORM_FRONTENDFEATURES_H_
103
104