Files
angle/include/platform/FrontendFeatures.h
T
Shahbaz Youssefi 797e627e64 Autogenerate list of features as enum
The WithX() and WithNoX() helpers are removed and replaced with enable()
and disable() member functions that take the name of the feature (as a
Feature::X enum constant).  This has two benefits:

- Adding tests that override a feature no longer requires additional
  helper functions to be written.
- There's no mistaking the feature name.

This change doesn't yet fix the main issue in anglebug.com/6435, but
does fix the following helpers using an old feature name (so they were
ineffective):

- WithMetalForcedBufferGPUStorage
- WithNoVulkanViewportFlip

A follow up would remove the old way of overriding features in tests and
replaces them with the new way.

Bug: angleproject:6435
Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2022-04-12 03:42:40 +00:00

92 lines
3.3 KiB
C++

// GENERATED FILE - DO NOT EDIT.
// Generated by gen_features.py using data from frontend_features.json.
//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// FrontendFeatures.h: Features/workarounds for driver bugs and other behaviors seen
// on all platforms.
#ifndef ANGLE_PLATFORM_FRONTENDFEATURES_H_
#define ANGLE_PLATFORM_FRONTENDFEATURES_H_
#include "platform/Feature.h"
namespace angle
{
struct FrontendFeatures : FeatureSetBase
{
FrontendFeatures();
~FrontendFeatures();
FeatureInfo loseContextOnOutOfMemory = {
"lose_context_on_out_of_memory",
FeatureCategory::FrontendWorkarounds,
"Some users rely on a lost context notification if a GL_OUT_OF_MEMORY error occurs",
&members,
};
FeatureInfo disableProgramCachingForTransformFeedback = {
"disable_program_caching_for_transform_feedback",
FeatureCategory::FrontendWorkarounds,
"On some GPUs, program binaries don't contain transform feedback varyings",
&members,
};
FeatureInfo scalarizeVecAndMatConstructorArgs = {
"scalarize_vec_and_mat_constructor_args", FeatureCategory::FrontendWorkarounds,
"Always rewrite vec/mat constructors to be consistent", &members,
"http://crbug.com/1165751"};
FeatureInfo disableProgramBinary = {"disable_program_binary", FeatureCategory::FrontendFeatures,
"Disable support for GL_OES_get_program_binary", &members,
"http://anglebug.com/5007"};
FeatureInfo disableAnisotropicFiltering = {
"disable_anisotropic_filtering",
FeatureCategory::FrontendWorkarounds,
"Disable support for anisotropic filtering",
&members,
};
FeatureInfo allowCompressedFormats = {
"allow_compressed_formats",
FeatureCategory::FrontendWorkarounds,
"Allow compressed formats",
&members,
};
FeatureInfo captureLimits = {"enable_capture_limits", FeatureCategory::FrontendFeatures,
"Set the context limits like frame capturing was enabled",
&members, "http://anglebug.com/5750"};
FeatureInfo enableCompressingPipelineCacheInThreadPool = {
"enableCompressingPipelineCacheInThreadPool", FeatureCategory::FrontendWorkarounds,
"Enable compressing pipeline cache in thread pool.", &members, "http://anglebug.com/4722"};
FeatureInfo forceRobustResourceInit = {
"forceRobustResourceInit", FeatureCategory::FrontendFeatures,
"Force-enable robust resource init", &members, "http://anglebug.com/6041"};
FeatureInfo forceInitShaderVariables = {
"forceInitShaderVariables",
FeatureCategory::FrontendFeatures,
"Force-enable shader variable initialization",
&members,
};
FeatureInfo enableProgramBinaryForCapture = {
"enableProgramBinaryForCapture", FeatureCategory::FrontendFeatures,
"Even if FrameCapture is enabled, enable GL_OES_get_program_binary", &members,
"http://anglebug.com/5658"};
};
inline FrontendFeatures::FrontendFeatures() = default;
inline FrontendFeatures::~FrontendFeatures() = default;
} // namespace angle
#endif // ANGLE_PLATFORM_FRONTENDFEATURES_H_