Path: blob/main_old/src/compiler/translator/AtomicCounterFunctionHLSL.h
1693 views
//1// Copyright 2018 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// AtomicCounterFunctionHLSL: Class for writing implementation of atomic counter functions into HLSL6// output.7//89#ifndef COMPILER_TRANSLATOR_ATOMICCOUNTERFUNCTIONHLSL_H_10#define COMPILER_TRANSLATOR_ATOMICCOUNTERFUNCTIONHLSL_H_1112#include <map>1314#include "compiler/translator/Common.h"15#include "compiler/translator/ImmutableString.h"1617namespace sh18{1920class TInfoSinkBase;21struct TLayoutQualifier;2223class AtomicCounterFunctionHLSL final : angle::NonCopyable24{25public:26AtomicCounterFunctionHLSL(bool forceResolution);2728ImmutableString useAtomicCounterFunction(const ImmutableString &name);2930void atomicCounterFunctionHeader(TInfoSinkBase &out);3132private:33enum class AtomicCounterFunction34{35LOAD,36INCREMENT,37DECREMENT,38INVALID39};4041std::map<ImmutableString, AtomicCounterFunction> mAtomicCounterFunctions;42bool mForceResolution;43};4445ImmutableString getAtomicCounterNameForBinding(int binding);4647} // namespace sh4849#endif // COMPILER_TRANSLATOR_ATOMICCOUNTERFUNCTIONHLSL_H_505152