Path: blob/main_old/include/platform/FrontendFeatures.h
1693 views
//1// Copyright 2016 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//56// FrontendFeatures.h: Features/workarounds for driver bugs and other behaviors seen7// on all platforms.89#ifndef ANGLE_PLATFORM_FRONTENDFEATURES_H_10#define ANGLE_PLATFORM_FRONTENDFEATURES_H_1112#include "platform/Feature.h"1314namespace angle15{1617struct FrontendFeatures : angle::FeatureSetBase18{19FrontendFeatures();20~FrontendFeatures();2122// Force the context to be lost (via KHR_robustness) if a GL_OUT_OF_MEMORY error occurs. The23// driver may be in an inconsistent state if this happens, and some users of ANGLE rely on this24// notification to prevent further execution.25angle::Feature loseContextOnOutOfMemory = {26"lose_context_on_out_of_memory", angle::FeatureCategory::FrontendWorkarounds,27"Some users rely on a lost context notification if a GL_OUT_OF_MEMORY "28"error occurs",29&members};3031// Program binaries don't contain transform feedback varyings on Qualcomm GPUs.32// Work around this by disabling the program cache for programs with transform feedback.33angle::Feature disableProgramCachingForTransformFeedback = {34"disable_program_caching_for_transform_feedback",35angle::FeatureCategory::FrontendWorkarounds,36"On some GPUs, program binaries don't contain transform feedback varyings", &members};3738// On Windows Intel OpenGL drivers TexImage sometimes seems to interact with the Framebuffer.39// Flaky crashes can occur unless we sync the Framebuffer bindings. The workaround is to add40// Framebuffer binding dirty bits to TexImage updates. See http://anglebug.com/290641angle::Feature syncFramebufferBindingsOnTexImage = {42"sync_framebuffer_bindings_on_tex_image", angle::FeatureCategory::FrontendWorkarounds,43"On some drivers TexImage sometimes seems to interact "44"with the Framebuffer",45&members};4647angle::Feature scalarizeVecAndMatConstructorArgs = {48"scalarize_vec_and_mat_constructor_args", angle::FeatureCategory::FrontendWorkarounds,49"Always rewrite vec/mat constructors to be consistent", &members,50"http://crbug.com/1165751"};5152// Disable support for GL_OES_get_program_binary53angle::Feature disableProgramBinary = {54"disable_program_binary", angle::FeatureCategory::FrontendFeatures,55"Disable support for GL_OES_get_program_binary", &members, "http://anglebug.com/5007"};5657// Allow disabling of GL_EXT_texture_filter_anisotropic through a runtime feature for58// performance comparisons.59angle::Feature disableAnisotropicFiltering = {60"disable_anisotropic_filtering", angle::FeatureCategory::FrontendWorkarounds,61"Disable support for anisotropic filtering", &members};6263// We can use this feature to override compressed format support for portability.64angle::Feature allowCompressedFormats = {"allow_compressed_formats",65angle::FeatureCategory::FrontendWorkarounds,66"Allow compressed formats", &members};6768angle::Feature captureLimits = {"enable_capture_limits",69angle::FeatureCategory::FrontendFeatures,70"Set the context limits like frame capturing was enabled",71&members, "http://anglebug.com/5750"};7273// Whether we should compress pipeline cache in thread pool before it's stored in blob cache.74// http://anglebug.com/472275angle::Feature enableCompressingPipelineCacheInThreadPool = {76"enableCompressingPipelineCacheInThreadPool", angle::FeatureCategory::FrontendWorkarounds,77"Enable compressing pipeline cache in thread pool.", &members, "http://anglebug.com/4722"};7879// Forces on robust resource init. Useful for some tests to avoid undefined values.80angle::Feature forceRobustResourceInit = {81"forceRobustResourceInit", angle::FeatureCategory::FrontendFeatures,82"Force-enable robust resource init", &members, "http://anglebug.com/6041"};8384// Forces on shader variable init to avoid undefined values in tests. This feature is enabled85// for WebGL and frame capture, which both require deterministic results.86angle::Feature forceInitShaderVariables = {87"forceInitShaderVariables", angle::FeatureCategory::FrontendFeatures,88"Force-enable shader variable initialization", &members};8990angle::Feature enableProgramBinaryForCapture = {91"enableProgramBinaryForCapture", angle::FeatureCategory::FrontendFeatures,92"Even if FrameCapture is enabled, enable GL_OES_get_program_binary", &members,93"http://anglebug.com/5658"};94};9596inline FrontendFeatures::FrontendFeatures() = default;97inline FrontendFeatures::~FrontendFeatures() = default;9899} // namespace angle100101#endif // ANGLE_PLATFORM_FRONTENDFEATURES_H_102103104