#include "compiler/translator/tree_ops/RewriteAtomicCounters.h"
#include "compiler/translator/Compiler.h"
#include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/tree_util/ReplaceVariable.h"
namespace sh
{
namespace
{
constexpr ImmutableString kAtomicCountersVarName = …;
constexpr ImmutableString kAtomicCountersBlockName = …;
constexpr ImmutableString kAtomicCounterFieldName = …;
const TVariable *DeclareAtomicCountersBuffers(TIntermBlock *root, TSymbolTable *symbolTable)
{ … }
TIntermTyped *CreateUniformBufferOffset(const TIntermTyped *uniformBufferOffsets, int binding)
{ … }
TIntermBinary *CreateAtomicCounterRef(TIntermTyped *atomicCounterExpression,
const TVariable *atomicCounters,
const TIntermTyped *uniformBufferOffsets)
{ … }
class RewriteAtomicCountersTraverser : public TIntermTraverser
{ … };
}
bool RewriteAtomicCounters(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
const TIntermTyped *acbBufferOffsets,
const TVariable **atomicCountersOut)
{ … }
}