Commit bbed8813 by Tim Van Patten Committed by Commit Bot

Create GN arg to enable non-conformant features

The GN arg angle_expose_non_conformant_extensions_and_versions is being added to control exposeNonConformantExtensionsAndVersions, which enables non-conformant features and extensions. In particular, this is being done to enable EXT_texture_buffer on devices that don't support all of the necessary formats since many Android games rely on this extension, such as "Special Forces Group 2", "Fortnite", and "PUBG". # Enables non-conformant extensions and features angle_expose_non_conformant_extensions_and_versions = false Users/vendors can now toggle the value with a GN arg, rather than a code change, to make it easier to test the conformant version of ANGLE with CTS, dEQP, etc. and/or app-compatibility. Bug: angleproject:5592 Change-Id: Icbf18b48a2751c03e277ae964e1ec278a43324cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2740643Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
parent 191bee56
...@@ -43,6 +43,9 @@ declare_args() { ...@@ -43,6 +43,9 @@ declare_args() {
# Adds run-time checks to filter out EVENT() messages when the debug annotator is disabled. # Adds run-time checks to filter out EVENT() messages when the debug annotator is disabled.
angle_enable_annotator_run_time_checks = false angle_enable_annotator_run_time_checks = false
# Enables non-conformant extensions and features
angle_expose_non_conformant_extensions_and_versions = false
} }
if (angle_build_all) { if (angle_build_all) {
...@@ -360,6 +363,10 @@ angle_static_library("angle_common") { ...@@ -360,6 +363,10 @@ angle_static_library("angle_common") {
libs = [ "android" ] libs = [ "android" ]
} }
} }
if (angle_expose_non_conformant_extensions_and_versions) {
defines = [ "ANGLE_EXPOSE_NON_CONFORMANT_EXTENSIONS_AND_VERSIONS" ]
}
} }
config("angle_image_util_config") { config("angle_image_util_config") {
......
...@@ -192,6 +192,15 @@ is_debug = false ...@@ -192,6 +192,15 @@ is_debug = false
dcheck_always_on = true dcheck_always_on = true
``` ```
#### Application Compatibility
Application compatibility may be increased by enabling non-conformant features and extensions with
a GN arg:
```
angle_expose_non_conformant_extensions_and_versions = true
```
## Command line for launching chrome on Android ## Command line for launching chrome on Android
[This Makefile](https://github.com/phuang/test/blob/master/chromium/Makefile) contains many useful command lines for launching chrome. [This Makefile](https://github.com/phuang/test/blob/master/chromium/Makefile) contains many useful command lines for launching chrome.
......
...@@ -40,6 +40,13 @@ ...@@ -40,6 +40,13 @@
namespace namespace
{ {
constexpr VkFormatFeatureFlags kInvalidFormatFeatureFlags = static_cast<VkFormatFeatureFlags>(-1); constexpr VkFormatFeatureFlags kInvalidFormatFeatureFlags = static_cast<VkFormatFeatureFlags>(-1);
#if defined(ANGLE_EXPOSE_NON_CONFORMANT_EXTENSIONS_AND_VERSIONS)
constexpr bool kExposeNonConformantExtensionsAndVersions = true;
#else
constexpr bool kExposeNonConformantExtensionsAndVersions = false;
#endif
} // anonymous namespace } // anonymous namespace
namespace rx namespace rx
...@@ -2151,6 +2158,10 @@ void RendererVk::initFeatures(DisplayVk *displayVk, ...@@ -2151,6 +2158,10 @@ void RendererVk::initFeatures(DisplayVk *displayVk,
// Negative viewports are exposed in the Maintenance1 extension and in core Vulkan 1.1+. // Negative viewports are exposed in the Maintenance1 extension and in core Vulkan 1.1+.
ANGLE_FEATURE_CONDITION(&mFeatures, supportsNegativeViewport, supportsNegativeViewport); ANGLE_FEATURE_CONDITION(&mFeatures, supportsNegativeViewport, supportsNegativeViewport);
// Whether non-conformant configurations and extensions should be exposed.
ANGLE_FEATURE_CONDITION(&mFeatures, exposeNonConformantExtensionsAndVersions,
kExposeNonConformantExtensionsAndVersions);
angle::PlatformMethods *platform = ANGLEPlatformCurrent(); angle::PlatformMethods *platform = ANGLEPlatformCurrent();
platform->overrideFeaturesVk(platform, &mFeatures); platform->overrideFeaturesVk(platform, &mFeatures);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment