summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-21 13:44:26 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-21 13:44:26 +0100
commit245acbf6e81518958228d295bdb6a64298b09351 (patch)
tree10a78831737274c2c55480437e60c74c884fde4d /src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp
parenteb466b636b97251d273aedddfe66b15fe994d375 (diff)
parent087aa1f3cb5975ef55e42db54487f737c93a4f0f (diff)
Merge remote-tracking branch 'origin/5.4.0' into 5.4
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp b/src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp
index 5b99fea948..dcbf3cea1d 100644
--- a/src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp
+++ b/src/3rdparty/angle/src/compiler/translator/TranslatorESSL.cpp
@@ -16,6 +16,8 @@ TranslatorESSL::TranslatorESSL(sh::GLenum type, ShShaderSpec spec)
void TranslatorESSL::translate(TIntermNode* root) {
TInfoSinkBase& sink = getInfoSink().obj;
+ writePragma();
+
// Write built-in extension behaviors.
writeExtensionBehavior();
@@ -37,8 +39,13 @@ void TranslatorESSL::writeExtensionBehavior() {
for (TExtensionBehavior::const_iterator iter = extensionBehavior.begin();
iter != extensionBehavior.end(); ++iter) {
if (iter->second != EBhUndefined) {
- sink << "#extension " << iter->first << " : "
- << getBehaviorString(iter->second) << "\n";
+ if (getResources().NV_draw_buffers && iter->first == "GL_EXT_draw_buffers") {
+ sink << "#extension GL_NV_draw_buffers : "
+ << getBehaviorString(iter->second) << "\n";
+ } else {
+ sink << "#extension " << iter->first << " : "
+ << getBehaviorString(iter->second) << "\n";
+ }
}
}
}