#include "compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h"
#include "compiler/translator/Compiler.h"
#include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/tree_util/RunAtTheEndOfShader.h"
namespace sh
{
namespace
{
constexpr const ImmutableString kGlFragDataString("gl_FragData");
constexpr const ImmutableString kGlSecondaryFragDataString("gl_SecondaryFragDataEXT");
class GLFragColorBroadcastTraverser : public TIntermTraverser
{ … };
TIntermBinary *GLFragColorBroadcastTraverser::constructGLFragDataNode(int index,
bool secondary) const
{ … }
TIntermBinary *GLFragColorBroadcastTraverser::constructGLFragDataAssignNode(int index,
bool secondary) const
{ … }
void GLFragColorBroadcastTraverser::visitSymbol(TIntermSymbol *node)
{ … }
bool GLFragColorBroadcastTraverser::broadcastGLFragColor(TCompiler *compiler, TIntermBlock *root)
{ … }
}
bool EmulateGLFragColorBroadcast(TCompiler *compiler,
TIntermBlock *root,
int maxDrawBuffers,
int maxDualSourceDrawBuffers,
std::vector<sh::ShaderVariable> *outputVariables,
TSymbolTable *symbolTable,
int shaderVersion)
{ … }
}