Jamie Madill | e794cd8 | 2017-01-13 17:29:51 -0500 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2016 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 | // OutputVulkanGLSL: |
| 7 | // Code that outputs shaders that fit GL_KHR_vulkan_glsl. |
| 8 | // The shaders are then fed into glslang to spit out SPIR-V (libANGLE-side). |
| 9 | // See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt |
| 10 | // |
| 11 | |
| 12 | #include "compiler/translator/OutputGLSL.h" |
| 13 | |
| 14 | namespace sh |
| 15 | { |
| 16 | |
| 17 | class TOutputVulkanGLSL : public TOutputGLSLBase |
| 18 | { |
| 19 | public: |
| 20 | TOutputVulkanGLSL(TInfoSinkBase &objSink, |
| 21 | ShArrayIndexClampingStrategy clampingStrategy, |
| 22 | ShHashFunction64 hashFunction, |
| 23 | NameMap &nameMap, |
| 24 | TSymbolTable &symbolTable, |
| 25 | sh::GLenum shaderType, |
| 26 | int shaderVersion, |
| 27 | ShShaderOutput output, |
| 28 | ShCompileOptions compileOptions); |
| 29 | |
| 30 | protected: |
| 31 | void writeLayoutQualifier(const TType &type) override; |
| 32 | bool writeVariablePrecision(TPrecision precision) override; |
| 33 | void visitSymbol(TIntermSymbol *node) override; |
| 34 | }; |
| 35 | |
| 36 | } // namespace sh |