#include <switches.h>
Public Member Functions | |
Switches () | |
~Switches () | |
Switches (const fml::CommandLine &command_line) | |
bool | AreValid (std::ostream &explain) const |
std::vector< TargetPlatform > | PlatformsToCompile () const |
A vector containing at least one valid platform. More... | |
TargetPlatform | SelectDefaultTargetPlatform () const |
SourceOptions | CreateSourceOptions (std::optional< TargetPlatform > target_platform=std::nullopt) const |
Static Public Member Functions | |
static void | PrintHelp (std::ostream &stream) |
Public Attributes | |
std::shared_ptr< fml::UniqueFD > | working_directory = nullptr |
std::vector< IncludeDir > | include_directories = {} |
std::string | source_file_name = "" |
SourceType | input_type = SourceType::kUnknown |
std::string | sl_file_name = "" |
bool | iplr = false |
std::string | shader_bundle = "" |
std::string | spirv_file_name = "" |
std::string | reflection_json_name = "" |
std::string | reflection_header_name = "" |
std::string | reflection_cc_name = "" |
std::string | depfile_path = "" |
std::vector< std::string > | defines = {} |
bool | json_format = false |
SourceLanguage | source_language = SourceLanguage::kUnknown |
uint32_t | gles_language_version = 0 |
std::string | metal_version = "" |
std::string | entry_point = "" |
bool | use_half_textures = false |
bool | require_framebuffer_fetch = false |
Definition at line 21 of file switches.h.
|
default |
|
default |
|
explicit |
Definition at line 160 of file switches.cc.
References defines, impeller::compiler::IncludeDir::dir, include_directories, impeller::compiler::IncludeDir::name, source_language, impeller::compiler::ToLowerCase(), impeller::compiler::ToSourceLanguage(), impeller::compiler::Utf8FromPath(), and working_directory.
bool impeller::compiler::Switches::AreValid | ( | std::ostream & | explain | ) | const |
Definition at line 240 of file switches.cc.
References iplr, impeller::compiler::kUnknown, shader_bundle, sl_file_name, source_file_name, source_language, spirv_file_name, impeller::compiler::Utf8FromPath(), and working_directory.
Referenced by impeller::compiler::Main(), and impeller::compiler::testing::TEST().
SourceOptions impeller::compiler::Switches::CreateSourceOptions | ( | std::optional< TargetPlatform > | target_platform = std::nullopt | ) | const |
Definition at line 308 of file switches.cc.
References impeller::compiler::SourceOptions::defines, defines, entry_point, impeller::compiler::SourceOptions::entry_point_name, impeller::compiler::EntryPointFunctionNameFromSourceName(), impeller::compiler::SourceOptions::file_name, impeller::compiler::SourceOptions::gles_language_version, gles_language_version, include_directories, impeller::compiler::SourceOptions::include_dirs, input_type, impeller::compiler::SourceOptions::json_format, json_format, impeller::compiler::kUnknown, impeller::compiler::SourceOptions::metal_version, metal_version, impeller::compiler::SourceOptions::require_framebuffer_fetch, require_framebuffer_fetch, SelectDefaultTargetPlatform(), source_file_name, impeller::compiler::SourceOptions::source_language, source_language, impeller::compiler::SourceTypeFromFileName(), impeller::compiler::SourceOptions::target_platform, impeller::compiler::SourceOptions::type, impeller::compiler::SourceOptions::use_half_textures, use_half_textures, impeller::compiler::SourceOptions::working_directory, and working_directory.
Referenced by impeller::compiler::CompileSkSL(), impeller::compiler::GenerateShaderBundle(), impeller::compiler::Main(), and impeller::compiler::OutputIPLR().
std::vector< TargetPlatform > impeller::compiler::Switches::PlatformsToCompile | ( | ) | const |
A vector containing at least one valid platform.
Definition at line 293 of file switches.cc.
References impeller::compiler::kUnknown.
Referenced by impeller::compiler::OutputIPLR().
|
static |
Definition at line 42 of file switches.cc.
References impeller::compiler::kKnownPlatforms, impeller::compiler::kKnownRuntimeStages, and impeller::compiler::kKnownSourceTypes.
Referenced by impeller::compiler::Main().
TargetPlatform impeller::compiler::Switches::SelectDefaultTargetPlatform | ( | ) | const |
Definition at line 300 of file switches.cc.
References impeller::compiler::kUnknown.
Referenced by CreateSourceOptions(), impeller::compiler::OutputDepfile(), and impeller::compiler::OutputIPLR().
std::vector<std::string> impeller::compiler::Switches::defines = {} |
Definition at line 38 of file switches.h.
Referenced by CreateSourceOptions(), and Switches().
std::string impeller::compiler::Switches::depfile_path = "" |
Definition at line 37 of file switches.h.
Referenced by impeller::compiler::OutputDepfile().
std::string impeller::compiler::Switches::entry_point = "" |
Definition at line 43 of file switches.h.
Referenced by CreateSourceOptions(), and impeller::compiler::testing::TEST().
uint32_t impeller::compiler::Switches::gles_language_version = 0 |
Definition at line 41 of file switches.h.
Referenced by CreateSourceOptions().
std::vector<IncludeDir> impeller::compiler::Switches::include_directories = {} |
Definition at line 24 of file switches.h.
Referenced by CreateSourceOptions(), Switches(), and impeller::compiler::testing::TEST().
SourceType impeller::compiler::Switches::input_type = SourceType::kUnknown |
Definition at line 26 of file switches.h.
Referenced by CreateSourceOptions().
bool impeller::compiler::Switches::iplr = false |
Definition at line 31 of file switches.h.
Referenced by AreValid(), impeller::compiler::Main(), and impeller::compiler::OutputIPLR().
bool impeller::compiler::Switches::json_format = false |
Definition at line 39 of file switches.h.
Referenced by CreateSourceOptions(), and impeller::compiler::OutputIPLR().
std::string impeller::compiler::Switches::metal_version = "" |
Definition at line 42 of file switches.h.
Referenced by CreateSourceOptions().
std::string impeller::compiler::Switches::reflection_cc_name = "" |
Definition at line 36 of file switches.h.
Referenced by impeller::compiler::OutputReflectionData().
std::string impeller::compiler::Switches::reflection_header_name = "" |
Definition at line 35 of file switches.h.
Referenced by impeller::compiler::CreateReflectorOptions(), and impeller::compiler::OutputReflectionData().
std::string impeller::compiler::Switches::reflection_json_name = "" |
Definition at line 34 of file switches.h.
Referenced by impeller::compiler::OutputReflectionData().
bool impeller::compiler::Switches::require_framebuffer_fetch = false |
Definition at line 45 of file switches.h.
Referenced by CreateSourceOptions().
std::string impeller::compiler::Switches::shader_bundle = "" |
Definition at line 32 of file switches.h.
Referenced by AreValid(), impeller::compiler::GenerateShaderBundle(), impeller::compiler::Main(), and impeller::compiler::testing::TEST().
std::string impeller::compiler::Switches::sl_file_name = "" |
The raw shader file output by the compiler. For –iplr and –shader-bundle modes, this is used as the filename for the output flatbuffer output.
Definition at line 30 of file switches.h.
Referenced by AreValid(), impeller::compiler::GenerateShaderBundle(), impeller::compiler::OutputDepfile(), impeller::compiler::OutputIPLR(), and impeller::compiler::OutputSLFile().
std::string impeller::compiler::Switches::source_file_name = "" |
Definition at line 25 of file switches.h.
Referenced by AreValid(), impeller::compiler::CreateReflectorOptions(), CreateSourceOptions(), and impeller::compiler::Main().
SourceLanguage impeller::compiler::Switches::source_language = SourceLanguage::kUnknown |
Definition at line 40 of file switches.h.
Referenced by AreValid(), CreateSourceOptions(), Switches(), and impeller::compiler::testing::TEST().
std::string impeller::compiler::Switches::spirv_file_name = "" |
Definition at line 33 of file switches.h.
Referenced by AreValid(), impeller::compiler::Main(), and impeller::compiler::OutputDepfile().
bool impeller::compiler::Switches::use_half_textures = false |
Definition at line 44 of file switches.h.
Referenced by CreateSourceOptions().
std::shared_ptr<fml::UniqueFD> impeller::compiler::Switches::working_directory = nullptr |
Definition at line 23 of file switches.h.
Referenced by AreValid(), CreateSourceOptions(), impeller::compiler::GenerateShaderBundle(), impeller::compiler::Main(), impeller::compiler::OutputDepfile(), impeller::compiler::OutputIPLR(), impeller::compiler::OutputReflectionData(), impeller::compiler::OutputSLFile(), and Switches().