Commit b0987761 by Zhenyao Mo Committed by Commit Bot

Don't emit shader_texture_lod and draw_buffers extensions in core profile shader.

BUG=angleproject:1416 TEST=conformance/extention/ in core profile R=jmadill@chromium.org,geofflang@chromium.org,cwallez@chromium.org Change-Id: I89b815929535586a2e90489129a1c6692bb87b3c Reviewed-on: https://chromium-review.googlesource.com/353820 Tryjob-Request: Zhenyao Mo <zmo@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
parent a81af59b
...@@ -168,17 +168,21 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root) ...@@ -168,17 +168,21 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root)
continue; continue;
} }
// For GLSL output, we don't need to emit most extensions explicitly, if (getOutputType() == SH_GLSL_COMPATIBILITY_OUTPUT)
// but some we need to translate.
if (iter.first == "GL_EXT_shader_texture_lod")
{ {
sink << "#extension GL_ARB_shader_texture_lod : " << getBehaviorString(iter.second) // For GLSL output, we don't need to emit most extensions explicitly,
<< "\n"; // but some we need to translate in GL compatibility profile.
} if (iter.first == "GL_EXT_shader_texture_lod")
{
sink << "#extension GL_ARB_shader_texture_lod : " << getBehaviorString(iter.second)
<< "\n";
}
if (iter.first == "GL_EXT_draw_buffers") if (iter.first == "GL_EXT_draw_buffers")
{ {
sink << "#extension GL_ARB_draw_buffers : " << getBehaviorString(iter.second) << "\n"; sink << "#extension GL_ARB_draw_buffers : " << getBehaviorString(iter.second)
<< "\n";
}
} }
} }
......
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