예제 #1
0
 // Assembles the given SPIR-V assembly and returns a SPIR-V binary module
 // compilation result.
 // The assembly should follow the syntax defined in the SPIRV-Tools project
 // (https://github.com/KhronosGroup/SPIRV-Tools/blob/master/syntax.md).
 // It is valid for the returned CompilationResult object to outlive this
 // compiler object.
 SpvCompilationResult AssembleToSpv(const char* source_assembly,
                                    size_t source_assembly_size) const {
     return SpvCompilationResult(shaderc_assemble_into_spv(
                                     compiler_, source_assembly, source_assembly_size));
 }
예제 #2
0
 // Assembles the given SPIR-V assembly and returns a SPIR-V binary module
 // compilation result.
 // Like the first AssembleToSpv method but the source is provided as a
 // std::string.
 SpvCompilationResult AssembleToSpv(const std::string& source_assembly) const {
     return SpvCompilationResult(shaderc_assemble_into_spv(
                                     compiler_, source_assembly.data(), source_assembly.size()));
 }
예제 #3
0
파일: shaderc.hpp 프로젝트: KHeresy/openvr
 // Assembles the given SPIR-V assembly and returns a SPIR-V binary module
 // compilation result.
 // The assembly should follow the syntax defined in the SPIRV-Tools project
 // (https://github.com/KhronosGroup/SPIRV-Tools/blob/master/syntax.md).
 // It is valid for the returned CompilationResult object to outlive this
 // compiler object.
 // The assembling will pick options suitable for assembling specified in the
 // CompileOptions parameter.
 SpvCompilationResult AssembleToSpv(const char* source_assembly,
                                    size_t source_assembly_size,
                                    const CompileOptions& options) const {
   return SpvCompilationResult(shaderc_assemble_into_spv(
       compiler_, source_assembly, source_assembly_size, options.options_));
 }