Commit 6b2639b0 by Jonah Ryan-Davis Committed by Commit Bot

Workaround to disable OES_get_program_binary

This is a useful workaround for testing/diagnostics. Disabled by default. Bug: angleproject:5007 Change-Id: If459f60ae7f8a2cd4ea934fe3e54d890387d57db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2385933 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent fdb7874d
...@@ -26,6 +26,7 @@ namespace angle ...@@ -26,6 +26,7 @@ namespace angle
enum class FeatureCategory enum class FeatureCategory
{ {
FrontendWorkarounds, FrontendWorkarounds,
FrontendFeatures,
OpenGLWorkarounds, OpenGLWorkarounds,
D3DWorkarounds, D3DWorkarounds,
D3DCompilerWorkarounds, D3DCompilerWorkarounds,
...@@ -35,6 +36,7 @@ enum class FeatureCategory ...@@ -35,6 +36,7 @@ enum class FeatureCategory
}; };
constexpr char kFeatureCategoryFrontendWorkarounds[] = "Frontend workarounds"; constexpr char kFeatureCategoryFrontendWorkarounds[] = "Frontend workarounds";
constexpr char kFeatureCategoryFrontendFeatures[] = "Frontend features";
constexpr char kFeatureCategoryOpenGLWorkarounds[] = "OpenGL workarounds"; constexpr char kFeatureCategoryOpenGLWorkarounds[] = "OpenGL workarounds";
constexpr char kFeatureCategoryD3DWorkarounds[] = "D3D workarounds"; constexpr char kFeatureCategoryD3DWorkarounds[] = "D3D workarounds";
constexpr char kFeatureCategoryD3DCompilerWorkarounds[] = "D3D compiler workarounds"; constexpr char kFeatureCategoryD3DCompilerWorkarounds[] = "D3D compiler workarounds";
...@@ -51,6 +53,10 @@ inline const char *FeatureCategoryToString(const FeatureCategory &fc) ...@@ -51,6 +53,10 @@ inline const char *FeatureCategoryToString(const FeatureCategory &fc)
return kFeatureCategoryFrontendWorkarounds; return kFeatureCategoryFrontendWorkarounds;
break; break;
case FeatureCategory::FrontendFeatures:
return kFeatureCategoryFrontendFeatures;
break;
case FeatureCategory::OpenGLWorkarounds: case FeatureCategory::OpenGLWorkarounds:
return kFeatureCategoryOpenGLWorkarounds; return kFeatureCategoryOpenGLWorkarounds;
break; break;
......
...@@ -49,6 +49,11 @@ struct FrontendFeatures : angle::FeatureSetBase ...@@ -49,6 +49,11 @@ struct FrontendFeatures : angle::FeatureSetBase
"scalarize_vec_and_mat_constructor_args", angle::FeatureCategory::FrontendWorkarounds, "scalarize_vec_and_mat_constructor_args", angle::FeatureCategory::FrontendWorkarounds,
"Always rewrite vec/mat constructors to be consistent", &members, "Always rewrite vec/mat constructors to be consistent", &members,
"http://crbug.com/398694"}; "http://crbug.com/398694"};
// Disable support for GL_OES_get_program_binary
angle::Feature disableProgramBinary = {
"disable_program_binary", angle::FeatureCategory::FrontendFeatures,
"Disable support for GL_OES_get_program_binary", &members, "http://anglebug.com/5007"};
}; };
inline FrontendFeatures::FrontendFeatures() = default; inline FrontendFeatures::FrontendFeatures() = default;
......
...@@ -3435,6 +3435,13 @@ void Context::initCaps() ...@@ -3435,6 +3435,13 @@ void Context::initCaps()
} }
} }
// Disable support for OES_get_program_binary
if (mDisplay->getFrontendFeatures().disableProgramBinary.enabled)
{
mState.mExtensions.getProgramBinaryOES = false;
mState.mCaps.programBinaryFormats.clear();
}
// Generate texture caps // Generate texture caps
updateCaps(); updateCaps();
} }
......
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