diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index 93ac47ee21b63cf260a715356579eb9803d4cb00..00ad793b43b8fdf8e004de8fbfce60e247f6450e 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -171,13 +171,24 @@ void TParseContext::initializeExtensionBehavior() const char* TParseContext::getPreamble() { if (profile == EEsProfile) { - return - "#define GL_ES 1\n" - "#define GL_OES_texture_3D 1\n" - "#define GL_OES_standard_derivatives 1\n" - "#define GL_EXT_frag_depth 1\n" - "#define GL_OES_EGL_image_external 1\n" - "#define GL_EXT_shader_texture_lod 1\n"; + if (version == 100) { + return + "#define GL_ES 1\n" + "#define GL_FRAGMENT_PRECISION_HIGH 1\n" + "#define GL_OES_texture_3D 1\n" + "#define GL_OES_standard_derivatives 1\n" + "#define GL_EXT_frag_depth 1\n" + "#define GL_OES_EGL_image_external 1\n" + "#define GL_EXT_shader_texture_lod 1\n"; + } else { + return + "#define GL_ES 1\n" + "#define GL_OES_texture_3D 1\n" + "#define GL_OES_standard_derivatives 1\n" + "#define GL_EXT_frag_depth 1\n" + "#define GL_OES_EGL_image_external 1\n" + "#define GL_EXT_shader_texture_lod 1\n"; + } } else { return "#define GL_FRAGMENT_PRECISION_HIGH 1\n"