5#ifndef FLUTTER_IMPELLER_COMPILER_SPIRV_COMPILER_H_
6#define FLUTTER_IMPELLER_COMPILER_SPIRV_COMPILER_H_
11#include "flutter/fml/mapping.h"
14#include "shaderc/shaderc.hpp"
20 shaderc_profile
profile = shaderc_profile_core;
25 shaderc_target_env
env = shaderc_target_env::shaderc_target_env_vulkan;
27 shaderc_env_version::shaderc_env_version_vulkan_1_1;
29 shaderc_spirv_version::shaderc_spirv_version_1_3;
41 shaderc_optimization_level::shaderc_optimization_level_performance;
46 std::optional<SPIRVCompilerTargetEnv>
target;
60 std::shared_ptr<const fml::Mapping>
sources);
65 std::stringstream& error_stream,
66 const shaderc::CompileOptions& spirv_options)
const;
70 const std::shared_ptr<const fml::Mapping> sources_;
72 std::string GetSourcePrefix()
const;
std::shared_ptr< fml::Mapping > CompileToSPV(std::stringstream &error_stream, const shaderc::CompileOptions &spirv_options) const
SPIRVCompiler(const SourceOptions &options, std::shared_ptr< const fml::Mapping > sources)
std::optional< shaderc_source_language > source_langauge
std::vector< std::string > macro_definitions
bool relaxed_vulkan_rules
shaderc_optimization_level optimization_level
std::optional< SPIRVCompilerSourceProfile > source_profile
std::shared_ptr< Includer > includer
shaderc::CompileOptions BuildShadercOptions() const
std::optional< SPIRVCompilerTargetEnv > target
shaderc_spirv_version spirv_version
shaderc_env_version version