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/398694"}; 52 }; 53 54 inline FrontendFeatures::FrontendFeatures() = default; 55 inline FrontendFeatures::~FrontendFeatures() = default; 56 57 } // namespace angle 58 59 #endif // ANGLE_PLATFORM_FRONTENDFEATURES_H_ 60