Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new Mali GPUs #19411

Merged
merged 3 commits into from
May 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cocos/renderer/CCGLProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,9 @@ bool GLProgram::compileShader(GLuint * shader, GLenum type, const GLchar* source
// Bugfix to make shader variables types constant to be understood by the current Android Virtual Devices or Emulators. This will also eliminate the 0x501 and 0x502 OpenGL Errors during emulation.
// Changed shader data types mediump to highp to remove possible sprite joggling on some Android phones.
#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
headersDef = "#version 100\n precision highp float;\n precision highp int;\n";
headersDef = (type == GL_VERTEX_SHADER ?
"#version 100\n precision highp float;\n precision highp int;\n" :
"#version 100\n precision mediump float;\n precision mediump int;\n");
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_LINUX && CC_TARGET_PLATFORM != CC_PLATFORM_MAC)
headersDef = (type == GL_VERTEX_SHADER ? "precision highp float;\n precision highp int;\n" : "precision mediump float;\n precision mediump int;\n");
#endif
Expand Down