Add flags to shader translator to emulate gl_DrawID
Adds support for translating gl_DrawID for implementation of
GL_ANGLE_multi_draw.
Currently the change only supports and allows emulation of the
draw id using a uniform variable named `gl_DrawID`. This uniform is
mapped in the translated shader to a hashed name that does not
use the gl_ namespace
Bug: chromium:890539
Change-Id: I08a246ca911e88e733ccdf22f1ed69dcae948e05
Reviewed-on: https://chromium-review.googlesource.com/c/1271957
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
diff --git a/src/compiler/translator/Initialize.cpp b/src/compiler/translator/Initialize.cpp
index e12a9b7..e362edb 100644
--- a/src/compiler/translator/Initialize.cpp
+++ b/src/compiler/translator/Initialize.cpp
@@ -81,6 +81,10 @@
{
extBehavior[TExtension::ANGLE_texture_multisample] = EBhUndefined;
}
+ if (resources.ANGLE_multi_draw)
+ {
+ extBehavior[TExtension::ANGLE_multi_draw] = EBhUndefined;
+ }
}
void ResetExtensionBehavior(TExtensionBehavior &extBehavior)