Skip to content

Instantly share code, notes, and snippets.

@mneumann
Created August 14, 2018 14:13
Show Gist options
  • Save mneumann/dc6928c35ee8135ff0569a9008f91833 to your computer and use it in GitHub Desktop.
Save mneumann/dc6928c35ee8135ff0569a9008f91833 to your computer and use it in GitHub Desktop.
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index 7305696..d40435f 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -78,6 +78,9 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
return nullptr;
}
+ // GET_PROC returns nullptr on Vivante GC880, so remove it.
+ extensions.remove("GL_EXT_draw_instanced");
+
GrGLInterface* interface = new GrGLInterface();
GrGLInterface::Functions* functions = &interface->fFunctions;
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index e97bc67..834f205 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -63,6 +63,9 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fShaderCaps.reset(new GrShaderCaps(contextOptions));
this->init(contextOptions, ctxInfo, glInterface);
+
+ // Vivante GC880: If this is set to true, fonts are scrambled.
+ fUnpackRowLengthSupport = false;
}
void GrGLCaps::init(const GrContextOptions& contextOptions,
@@ -636,7 +639,8 @@ const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration
return "#version 100\n";
} else {
SkASSERT(kGL_GrGLStandard == standard);
- return "#version 110\n";
+ // Vivante GC880: Fails to parse version 110.
+ return "#version 100\n";
}
case k130_GrGLSLGeneration:
SkASSERT(kGL_GrGLStandard == standard);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment