1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SKSL_HLSLCODEGENERATOR 9 #define SKSL_HLSLCODEGENERATOR 10 11 #include <string> 12 13 namespace SkSL { 14 15 class OutputStream; 16 struct Program; 17 struct ShaderCaps; 18 19 /** Converts a Program into HLSL code. (SPIRV-Cross must be enabled.) */ 20 bool ToHLSL(Program& program, const ShaderCaps* caps, OutputStream& out); 21 bool ToHLSL(Program& program, const ShaderCaps* caps, std::string* out); 22 23 } // namespace SkSL 24 25 #endif 26