mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[Impeller] disable gl ext render to texture on vivante. (#169153)
Found code in ANGLE that seems to indicate there are known crashes with vivnate drivers using gl_ext_render_to_texture. Landing to see if it fixes https://github.com/flutter/flutter/issues/167850 which we don't have a device to test for.
This commit is contained in:
parent
dd671fae53
commit
efc27a570e
@ -7,8 +7,31 @@
|
||||
#include "impeller/core/formats.h"
|
||||
#include "impeller/renderer/backend/gles/proc_table_gles.h"
|
||||
|
||||
#ifdef FML_OS_ANDROID
|
||||
#include <sys/system_properties.h>
|
||||
#endif // FML_OS_ANDROID
|
||||
|
||||
namespace impeller {
|
||||
|
||||
namespace {
|
||||
// Workaround for crashes in Vivante GL driver on Android.
|
||||
//
|
||||
// See:
|
||||
// * https://github.com/flutter/flutter/issues/167850
|
||||
// * http://crbug.com/141785
|
||||
#ifdef FML_OS_ANDROID
|
||||
bool IsVivante() {
|
||||
char product_model[PROP_VALUE_MAX];
|
||||
__system_property_get("ro.hardware.egl", product_model);
|
||||
return strcmp(product_model, "VIVANTE") == 0;
|
||||
}
|
||||
#else
|
||||
bool IsVivante() {
|
||||
return false;
|
||||
}
|
||||
#endif // FML_OS_ANDROID
|
||||
} // namespace
|
||||
|
||||
// https://registry.khronos.org/OpenGL/extensions/EXT/EXT_shader_framebuffer_fetch.txt
|
||||
static const constexpr char* kFramebufferFetchExt =
|
||||
"GL_EXT_shader_framebuffer_fetch";
|
||||
@ -124,7 +147,7 @@ CapabilitiesGLES::CapabilitiesGLES(const ProcTableGLES& gl) {
|
||||
supports_decal_sampler_address_mode_ = true;
|
||||
}
|
||||
|
||||
if (desc->HasExtension(kMultisampledRenderToTextureExt)) {
|
||||
if (desc->HasExtension(kMultisampledRenderToTextureExt) && !IsVivante()) {
|
||||
supports_implicit_msaa_ = true;
|
||||
|
||||
if (desc->HasExtension(kMultisampledRenderToTexture2Ext)) {
|
||||
|
Loading…
Reference in New Issue
Block a user