• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // TOutputVulkanGLSLForMetal:
7 //    This is a special version Vulkan GLSL output that will make some special
8 //    considerations for Metal backend limitations.
9 //
10 
11 #ifndef COMPILER_TRANSLATOR_OUTPUTVULKANGLSLFORMETAL_H_
12 #define COMPILER_TRANSLATOR_OUTPUTVULKANGLSLFORMETAL_H_
13 
14 #include "compiler/translator/OutputVulkanGLSL.h"
15 
16 namespace sh
17 {
18 
19 class TOutputVulkanGLSLForMetal : public TOutputVulkanGLSL
20 {
21   public:
22     TOutputVulkanGLSLForMetal(TInfoSinkBase &objSink,
23                               ShHashFunction64 hashFunction,
24                               NameMap &nameMap,
25                               TSymbolTable *symbolTable,
26                               sh::GLenum shaderType,
27                               int shaderVersion,
28                               ShShaderOutput output,
29                               ShCompileOptions compileOptions);
30 
31     static void RemoveInvariantForTest(bool remove);
32 
33   protected:
34     bool visitGlobalQualifierDeclaration(Visit visit,
35                                          TIntermGlobalQualifierDeclaration *node) override;
36     void writeVariableType(const TType &type,
37                            const TSymbol *symbol,
38                            bool isFunctionArgument) override;
39 };
40 
41 }  // namespace sh
42 
43 #endif  // COMPILER_TRANSLATOR_OUTPUTVULKANGLSLFORMETAL_H_
44