Namespaces | |
testing | |
Classes | |
class | Compiler |
struct | CompilerBackend |
struct | IncludeDir |
struct | IncluderData |
class | Includer |
class | AutoLogger |
struct | KnownType |
struct | VertexType |
struct | StructMember |
class | Reflector |
class | RuntimeStageData |
class | ShaderBundleData |
struct | SourceOptions |
class | UniqueIncluder |
Wraps a shared includer so unique includers may be created to satisfy the shaderc API. This is a simple proxy object and does nothing. More... | |
struct | SPIRVCompilerSourceProfile |
struct | SPIRVCompilerTargetEnv |
struct | SPIRVCompilerOptions |
class | SPIRVCompiler |
class | CompilerSkSL |
class | Switches |
struct | UniformDescription |
struct | InputDescription |
struct | ShaderConfig |
A shader config parsed as part of a ShaderBundleConfig. More... | |
Typedefs | |
using | ShaderBundleConfig = std::unordered_map< std::string, ShaderConfig > |
Enumerations | |
enum class | SourceType { kUnknown , kVertexShader , kFragmentShader , kComputeShader } |
enum class | TargetPlatform { kUnknown , kMetalDesktop , kMetalIOS , kOpenGLES , kOpenGLDesktop , kVulkan , kRuntimeStageMetal , kRuntimeStageGLES , kRuntimeStageGLES3 , kRuntimeStageVulkan , kSkSL } |
enum class | SourceLanguage { kUnknown , kGLSL , kHLSL } |
Functions | |
static uint32_t | ParseMSLVersion (const std::string &msl_version) |
static CompilerBackend | CreateMSLCompiler (const spirv_cross::ParsedIR &ir, const SourceOptions &source_options, std::optional< uint32_t > msl_version_override={}) |
static CompilerBackend | CreateVulkanCompiler (const spirv_cross::ParsedIR &ir, const SourceOptions &source_options) |
static CompilerBackend | CreateGLSLCompiler (const spirv_cross::ParsedIR &ir, const SourceOptions &source_options) |
static CompilerBackend | CreateSkSLCompiler (const spirv_cross::ParsedIR &ir, const SourceOptions &source_options) |
static bool | EntryPointMustBeNamedMain (TargetPlatform platform) |
static CompilerBackend | CreateCompiler (const spirv_cross::ParsedIR &ir, const SourceOptions &source_options) |
static std::string | JoinStrings (std::vector< std::string > items, const std::string &separator) |
static Reflector::Options | CreateReflectorOptions (const SourceOptions &options, const Switches &switches) |
static std::shared_ptr< RuntimeStageData::Shader > | CompileSkSL (std::shared_ptr< fml::Mapping > source_file_mapping, const Switches &switches) |
static bool | OutputIPLR (const Switches &switches, const std::shared_ptr< fml::Mapping > &source_file_mapping) |
static bool | OutputSLFile (const Compiler &compiler, const Switches &switches) |
static bool | OutputReflectionData (const Compiler &compiler, const Switches &switches, const SourceOptions &options) |
static bool | OutputDepfile (const Compiler &compiler, const Switches &switches) |
bool | Main (const fml::CommandLine &command_line) |
static std::string | ExecutionModelToString (spv::ExecutionModel model) |
static std::string | StringToShaderStage (const std::string &str) |
static std::optional< RuntimeStageBackend > | GetRuntimeStageBackend (TargetPlatform target_platform) |
static std::string | ToString (CompilerBackend::Type type) |
static std::string | TypeNameWithPaddingOfSize (size_t size) |
static std::optional< KnownType > | ReadKnownScalarType (spirv_cross::SPIRType::BaseType type) |
static size_t | GetReflectedStructSize (const std::vector< StructMember > &members) |
Get the reflected struct size. In the vast majority of the cases, this is the same as the declared struct size as given by the compiler. But, additional padding may need to be introduced after the end of the struct to keep in line with the alignment requirement of the individual struct members. This method figures out the actual size of the reflected struct that can be referenced in native code. More... | |
static VertexType | VertexTypeFromInputResource (const spirv_cross::Compiler &compiler, const spirv_cross::Resource *resource) |
static std::optional< fb::Stage > | ToStage (spv::ExecutionModel stage) |
static std::optional< fb::Stage > | ToJsonStage (spv::ExecutionModel stage) |
static std::optional< fb::UniformDataType > | ToUniformType (spirv_cross::SPIRType::BaseType type) |
static std::optional< fb::InputDataType > | ToInputType (spirv_cross::SPIRType::BaseType type) |
static std::optional< uint32_t > | ToJsonType (spirv_cross::SPIRType::BaseType type) |
static std::string | RuntimeStageBackendToString (RuntimeStageBackend backend) |
std::optional< ShaderBundleConfig > | ParseShaderBundleConfig (const std::string &bundle_config_json, std::ostream &error_stream) |
Parse a shader bundle configuration from a given JSON string. More... | |
static std::unique_ptr< fb::shaderbundle::BackendShaderT > | GenerateShaderBackendFB (TargetPlatform target_platform, SourceOptions &options, const std::string &shader_name, const ShaderConfig &shader_config) |
static std::unique_ptr< fb::shaderbundle::ShaderT > | GenerateShaderFB (SourceOptions options, const std::string &shader_name, const ShaderConfig &shader_config) |
std::optional< fb::shaderbundle::ShaderBundleT > | GenerateShaderBundleFlatbuffer (const std::string &bundle_config_json, const SourceOptions &options) |
Parses the JSON shader bundle configuration and invokes the compiler multiple times to produce a shader bundle flatbuffer. More... | |
bool | GenerateShaderBundle (Switches &switches) |
Parses the JSON shader bundle configuration and invokes the compiler multiple times to produce a shader bundle flatbuffer, which is then output to the sl file. More... | |
static std::optional< fb::shaderbundle::ShaderStage > | ToStage (spv::ExecutionModel stage) |
static std::optional< fb::shaderbundle::UniformDataType > | ToUniformType (spirv_cross::SPIRType::BaseType type) |
static std::optional< fb::shaderbundle::InputDataType > | ToInputType (spirv_cross::SPIRType::BaseType type) |
static void | SetDefaultLimitations (shaderc::CompileOptions &compiler_opts) |
static void | SetBindingBaseOffset (shaderc::CompileOptions &options) |
void | report_and_exit (const std::string &msg) |
static TargetPlatform | TargetPlatformFromCommandLine (const fml::CommandLine &command_line) |
static std::vector< TargetPlatform > | RuntimeStagesFromCommandLine (const fml::CommandLine &command_line) |
static SourceType | SourceTypeFromCommandLine (const fml::CommandLine &command_line) |
static bool | StringEndWith (const std::string &string, const std::string &suffix) |
SourceType | SourceTypeFromFileName (const std::string &file_name) |
SourceType | SourceTypeFromString (std::string name) |
SourceLanguage | ToSourceLanguage (const std::string &source_language) |
std::string | TargetPlatformToString (TargetPlatform platform) |
std::string | SourceLanguageToString (SourceLanguage source_language) |
std::string | EntryPointFunctionNameFromSourceName (const std::string &file_name, SourceType type, SourceLanguage source_language, const std::string &entry_point_name) |
bool | TargetPlatformNeedsReflection (TargetPlatform platform) |
std::string | ShaderCErrorToString (shaderc_compilation_status status) |
shaderc_shader_kind | ToShaderCShaderKind (SourceType type) |
spv::ExecutionModel | ToExecutionModel (SourceType type) |
spirv_cross::CompilerMSL::Options::Platform | TargetPlatformToMSLPlatform (TargetPlatform platform) |
std::string | SourceTypeToString (SourceType type) |
std::string | TargetPlatformSLExtension (TargetPlatform platform) |
bool | TargetPlatformIsOpenGL (TargetPlatform platform) |
bool | TargetPlatformIsMetal (TargetPlatform platform) |
bool | TargetPlatformIsVulkan (TargetPlatform platform) |
bool | TargetPlatformBundlesSkSL (TargetPlatform platform) |
bool | SetPermissiveAccess (const std::filesystem::path &p) |
Sets the file access mode of the file at path 'p' to 0644. More... | |
std::string | Utf8FromPath (const std::filesystem::path &path) |
Converts a native format path to a utf8 string. More... | |
std::string | InferShaderNameFromPath (std::string_view path) |
std::string | ToCamelCase (std::string_view string) |
std::string | ToLowerCase (std::string_view string) |
std::string | ConvertToEntrypointName (std::string_view string) |
Ensure that the entrypoint name is a valid identifier in the target language. More... | |
bool | StringStartsWith (const std::string &target, const std::string &prefix) |
Variables | |
constexpr std::string_view | kReflectionHeaderTemplate |
constexpr std::string_view | kReflectionCCTemplate |
static const uint32_t | kMaxUniformBufferSize = 6208 |
constexpr char | kExternalTexturePrefix [] = "SAMPLER_EXTERNAL_OES_" |
static const char * | kStageKey = "stage" |
static const char * | kTargetPlatformKey = "target_platform" |
static const char * | kEntrypointKey = "entrypoint" |
static const char * | kUniformsKey = "uniforms" |
static const char * | kShaderKey = "shader" |
static const char * | kUniformNameKey = "name" |
static const char * | kUniformLocationKey = "location" |
static const char * | kUniformTypeKey = "type" |
static const char * | kUniformRowsKey = "rows" |
static const char * | kUniformColumnsKey = "columns" |
static const char * | kUniformBitWidthKey = "bit_width" |
static const char * | kUniformArrayElementsKey = "array_elements" |
static const std::map< std::string, TargetPlatform > | kKnownPlatforms |
static const std::map< std::string, TargetPlatform > | kKnownRuntimeStages |
static const std::map< std::string, SourceType > | kKnownSourceTypes |
using impeller::compiler::ShaderBundleConfig = typedef std::unordered_map<std::string, ShaderConfig> |
|
strong |
|
strong |
|
strong |
Enumerator | |
---|---|
kUnknown | |
kMetalDesktop | |
kMetalIOS | |
kOpenGLES | |
kOpenGLDesktop | |
kVulkan | |
kRuntimeStageMetal | |
kRuntimeStageGLES | |
kRuntimeStageGLES3 | |
kRuntimeStageVulkan | |
kSkSL |
Definition at line 28 of file types.h.
|
static |
Run the shader compiler to geneate SkSL reflection data. If there is an error, prints error text and returns nullptr
.
Definition at line 37 of file impellerc_main.cc.
References CreateReflectorOptions(), impeller::compiler::Switches::CreateSourceOptions(), impeller::compiler::Compiler::GetErrorMessages(), impeller::compiler::Compiler::GetReflector(), impeller::compiler::Reflector::GetRuntimeStageShaderData(), impeller::compiler::Compiler::IsValid(), kSkSL, and impeller::compiler::Reflector::Options::target_platform.
Referenced by OutputIPLR().
std::string impeller::compiler::ConvertToEntrypointName | ( | std::string_view | string | ) |
Ensure that the entrypoint name is a valid identifier in the target language.
Definition at line 69 of file utilities.cc.
References data.
Referenced by EntryPointFunctionNameFromSourceName(), and impeller::compiler::testing::TEST().
|
static |
Definition at line 230 of file compiler.cc.
References CreateGLSLCompiler(), CreateMSLCompiler(), CreateSkSLCompiler(), CreateVulkanCompiler(), impeller::compiler::SourceOptions::entry_point_name, EntryPointMustBeNamedMain(), impeller::compiler::CompilerBackend::GetCompiler(), kGLSL, kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, kVulkan, impeller::compiler::SourceOptions::source_language, impeller::compiler::SourceOptions::target_platform, ToExecutionModel(), and impeller::compiler::SourceOptions::type.
Referenced by impeller::compiler::Compiler::Compiler().
|
static |
Definition at line 146 of file compiler.cc.
References impeller::compiler::SourceOptions::gles_language_version, kExternalTexturePrefix, kFragmentShader, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, impeller::compiler::SourceOptions::require_framebuffer_fetch, StringStartsWith(), impeller::compiler::SourceOptions::target_platform, impeller::compiler::SourceOptions::type, and type.
Referenced by CreateCompiler().
|
static |
Definition at line 63 of file compiler.cc.
Referenced by CreateCompiler().
|
static |
Definition at line 23 of file impellerc_main.cc.
References impeller::compiler::Reflector::Options::entry_point_name, impeller::compiler::SourceOptions::entry_point_name, impeller::compiler::Reflector::Options::header_file_name, InferShaderNameFromPath(), impeller::compiler::Switches::reflection_header_name, impeller::compiler::Reflector::Options::shader_name, impeller::compiler::Switches::source_file_name, impeller::compiler::Reflector::Options::target_platform, impeller::compiler::SourceOptions::target_platform, and Utf8FromPath().
Referenced by CompileSkSL(), Main(), and OutputIPLR().
|
static |
|
static |
std::string impeller::compiler::EntryPointFunctionNameFromSourceName | ( | const std::string & | file_name, |
SourceType | type, | ||
SourceLanguage | source_language, | ||
const std::string & | entry_point_name | ||
) |
Definition at line 113 of file types.cc.
References ConvertToEntrypointName(), kComputeShader, kFragmentShader, kHLSL, kUnknown, kVertexShader, type, and Utf8FromPath().
Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::Switches::CreateSourceOptions(), and GenerateShaderBackendFB().
|
static |
Definition at line 210 of file compiler.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by CreateCompiler().
|
static |
Definition at line 33 of file reflector.cc.
|
static |
Override options.
Definition at line 85 of file shader_bundle.cc.
References impeller::compiler::ShaderConfig::entry_point, impeller::compiler::Reflector::Options::entry_point_name, impeller::compiler::SourceOptions::entry_point_name, EntryPointFunctionNameFromSourceName(), impeller::compiler::SourceOptions::file_name, impeller::compiler::Compiler::GetErrorMessages(), impeller::compiler::Compiler::GetReflector(), impeller::compiler::Reflector::GetShaderBundleData(), impeller::compiler::Compiler::IsValid(), impeller::compiler::ShaderConfig::language, impeller::compiler::Reflector::Options::shader_name, impeller::compiler::ShaderConfig::source_file_name, impeller::compiler::SourceOptions::source_language, impeller::compiler::Reflector::Options::target_platform, impeller::compiler::SourceOptions::target_platform, impeller::compiler::SourceOptions::type, and impeller::compiler::ShaderConfig::type.
Referenced by GenerateShaderFB().
bool impeller::compiler::GenerateShaderBundle | ( | Switches & | switches | ) |
Parses the JSON shader bundle configuration and invokes the compiler multiple times to produce a shader bundle flatbuffer, which is then output to the sl
file.
Definition at line 210 of file shader_bundle.cc.
References impeller::compiler::Switches::CreateSourceOptions(), GenerateShaderBundleFlatbuffer(), SetPermissiveAccess(), impeller::compiler::Switches::shader_bundle, impeller::compiler::Switches::sl_file_name, Utf8FromPath(), and impeller::compiler::Switches::working_directory.
Referenced by Main().
std::optional< fb::shaderbundle::ShaderBundleT > impeller::compiler::GenerateShaderBundleFlatbuffer | ( | const std::string & | bundle_config_json, |
const SourceOptions & | options | ||
) |
Parses the JSON shader bundle configuration and invokes the compiler multiple times to produce a shader bundle flatbuffer.
GenerateShaderBundle
directly. Definition at line 179 of file shader_bundle.cc.
References GenerateShaderFB(), and ParseShaderBundleConfig().
Referenced by GenerateShaderBundle(), and impeller::compiler::testing::TEST().
|
static |
Definition at line 145 of file shader_bundle.cc.
References GenerateShaderBackendFB(), kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, and kVulkan.
Referenced by GenerateShaderBundleFlatbuffer().
|
static |
Get the reflected struct size. In the vast majority of the cases, this is the same as the declared struct size as given by the compiler. But, additional padding may need to be introduced after the end of the struct to keep in line with the alignment requirement of the individual struct members. This method figures out the actual size of the reflected struct that can be referenced in native code.
[in] | members | The members |
Definition at line 801 of file reflector.cc.
|
static |
Definition at line 301 of file reflector.cc.
References impeller::kMetal, kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, impeller::kOpenGLES, impeller::kOpenGLES3, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, impeller::kSkSL, kUnknown, kVulkan, and impeller::kVulkan.
std::string impeller::compiler::InferShaderNameFromPath | ( | std::string_view | path | ) |
Definition at line 34 of file utilities.cc.
References Utf8FromPath().
Referenced by CreateReflectorOptions().
|
static |
Definition at line 512 of file compiler.cc.
Referenced by impeller::compiler::Compiler::CreateDepfileContents().
bool impeller::compiler::Main | ( | const fml::CommandLine & | command_line | ) |
Definition at line 234 of file impellerc_main.cc.
References impeller::compiler::Switches::AreValid(), CreateReflectorOptions(), impeller::compiler::Switches::CreateSourceOptions(), GenerateShaderBundle(), impeller::compiler::Compiler::GetErrorMessages(), impeller::compiler::Compiler::GetSPIRVAssembly(), impeller::compiler::Switches::iplr, impeller::compiler::Compiler::IsValid(), OutputDepfile(), OutputIPLR(), OutputReflectionData(), OutputSLFile(), impeller::compiler::Switches::PrintHelp(), impeller::compiler::Switches::shader_bundle, impeller::compiler::Switches::source_file_name, impeller::compiler::Switches::spirv_file_name, Utf8FromPath(), and impeller::compiler::Switches::working_directory.
Referenced by main().
|
static |
Definition at line 196 of file impellerc_main.cc.
References impeller::compiler::Compiler::CreateDepfileContents(), impeller::compiler::Switches::depfile_path, kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, kVulkan, impeller::compiler::Switches::SelectDefaultTargetPlatform(), impeller::compiler::Switches::sl_file_name, impeller::compiler::Switches::spirv_file_name, Utf8FromPath(), and impeller::compiler::Switches::working_directory.
Referenced by Main().
|
static |
Definition at line 56 of file impellerc_main.cc.
References impeller::compiler::RuntimeStageData::AddShader(), CompileSkSL(), impeller::compiler::RuntimeStageData::CreateJsonMapping(), impeller::compiler::RuntimeStageData::CreateMapping(), CreateReflectorOptions(), impeller::compiler::Switches::CreateSourceOptions(), impeller::compiler::Compiler::GetErrorMessages(), impeller::compiler::Compiler::GetReflector(), impeller::compiler::Reflector::GetRuntimeStageShaderData(), impeller::compiler::Switches::iplr, impeller::compiler::Compiler::IsValid(), impeller::compiler::Switches::json_format, kSkSL, impeller::compiler::Switches::PlatformsToCompile(), impeller::compiler::Switches::SelectDefaultTargetPlatform(), SetPermissiveAccess(), impeller::compiler::Switches::sl_file_name, TargetPlatformBundlesSkSL(), Utf8FromPath(), and impeller::compiler::Switches::working_directory.
Referenced by Main().
|
static |
Definition at line 144 of file impellerc_main.cc.
References impeller::compiler::Reflector::GetReflectionCC(), impeller::compiler::Reflector::GetReflectionHeader(), impeller::compiler::Reflector::GetReflectionJSON(), impeller::compiler::Compiler::GetReflector(), impeller::compiler::Switches::reflection_cc_name, impeller::compiler::Switches::reflection_header_name, impeller::compiler::Switches::reflection_json_name, impeller::compiler::SourceOptions::target_platform, TargetPlatformNeedsReflection(), Utf8FromPath(), and impeller::compiler::Switches::working_directory.
Referenced by Main().
|
static |
Definition at line 126 of file impellerc_main.cc.
References impeller::compiler::Compiler::GetSLShaderSource(), impeller::compiler::Switches::sl_file_name, Utf8FromPath(), and impeller::compiler::Switches::working_directory.
Referenced by Main().
|
static |
Definition at line 40 of file compiler.cc.
std::optional< ShaderBundleConfig > impeller::compiler::ParseShaderBundleConfig | ( | const std::string & | bundle_config_json, |
std::ostream & | error_stream | ||
) |
Parse a shader bundle configuration from a given JSON string.
GenerateShaderBundle
directly. Definition at line 19 of file shader_bundle.cc.
References impeller::compiler::ShaderConfig::entry_point, kGLSL, kUnknown, impeller::compiler::ShaderConfig::language, impeller::compiler::ShaderConfig::source_file_name, SourceTypeFromString(), ToSourceLanguage(), and impeller::compiler::ShaderConfig::type.
Referenced by GenerateShaderBundleFlatbuffer(), and impeller::compiler::testing::TEST().
|
static |
Definition at line 754 of file reflector.cc.
References impeller::compiler::KnownType::name, and type.
void impeller::compiler::report_and_exit | ( | const std::string & | msg | ) |
Definition at line 16 of file spirv_sksl.cc.
|
static |
Definition at line 197 of file runtime_stage_data.cc.
References impeller::kMetal, impeller::kOpenGLES, impeller::kOpenGLES3, impeller::kSkSL, and impeller::kVulkan.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 138 of file switches.cc.
References kKnownRuntimeStages.
|
static |
Definition at line 210 of file spirv_compiler.cc.
Referenced by impeller::compiler::SPIRVCompilerOptions::BuildShadercOptions().
|
static |
Definition at line 92 of file spirv_compiler.cc.
References value.
Referenced by impeller::compiler::SPIRVCompilerOptions::BuildShadercOptions().
bool impeller::compiler::SetPermissiveAccess | ( | const std::filesystem::path & | p | ) |
Sets the file access mode of the file at path 'p' to 0644.
Definition at line 16 of file utilities.cc.
Referenced by GenerateShaderBundle(), and OutputIPLR().
std::string impeller::compiler::ShaderCErrorToString | ( | shaderc_compilation_status | status | ) |
Definition at line 162 of file types.cc.
Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV().
std::string impeller::compiler::SourceLanguageToString | ( | SourceLanguage | source_language | ) |
|
static |
Definition at line 149 of file switches.cc.
References kKnownSourceTypes, and kUnknown.
SourceType impeller::compiler::SourceTypeFromFileName | ( | const std::string & | file_name | ) |
Definition at line 30 of file types.cc.
References kComputeShader, kFragmentShader, kUnknown, kVertexShader, and StringEndWith().
Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), impeller::compiler::Switches::CreateSourceOptions(), and impeller::compiler::testing::TEST().
SourceType impeller::compiler::SourceTypeFromString | ( | std::string | name | ) |
Definition at line 46 of file types.cc.
References kComputeShader, kFragmentShader, kUnknown, kVertexShader, and ToLowerCase().
Referenced by ParseShaderBundleConfig().
std::string impeller::compiler::SourceTypeToString | ( | SourceType | type | ) |
Definition at line 236 of file types.cc.
References kComputeShader, kFragmentShader, kUnknown, kVertexShader, and type.
|
static |
bool impeller::compiler::StringStartsWith | ( | const std::string & | target, |
const std::string & | prefix | ||
) |
|
static |
Definition at line 46 of file reflector.cc.
bool impeller::compiler::TargetPlatformBundlesSkSL | ( | TargetPlatform | platform | ) |
Definition at line 328 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by OutputIPLR().
|
static |
Definition at line 120 of file switches.cc.
References kKnownPlatforms, and kUnknown.
bool impeller::compiler::TargetPlatformIsMetal | ( | TargetPlatform | platform | ) |
Definition at line 290 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::testing::TEST_P().
bool impeller::compiler::TargetPlatformIsOpenGL | ( | TargetPlatform | platform | ) |
Definition at line 271 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
bool impeller::compiler::TargetPlatformIsVulkan | ( | TargetPlatform | platform | ) |
Definition at line 309 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::testing::TEST_P().
bool impeller::compiler::TargetPlatformNeedsReflection | ( | TargetPlatform | platform | ) |
Definition at line 143 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), and OutputReflectionData().
std::string impeller::compiler::TargetPlatformSLExtension | ( | TargetPlatform | platform | ) |
Definition at line 250 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::testing::SLFileName().
spirv_cross::CompilerMSL::Options::Platform impeller::compiler::TargetPlatformToMSLPlatform | ( | TargetPlatform | platform | ) |
Definition at line 215 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
std::string impeller::compiler::TargetPlatformToString | ( | TargetPlatform | platform | ) |
Definition at line 74 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageGLES3, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
std::string impeller::compiler::ToCamelCase | ( | std::string_view | string | ) |
Definition at line 39 of file utilities.cc.
spv::ExecutionModel impeller::compiler::ToExecutionModel | ( | SourceType | type | ) |
Definition at line 201 of file types.cc.
References kComputeShader, kFragmentShader, kUnknown, kVertexShader, and type.
Referenced by CreateCompiler().
|
static |
Definition at line 95 of file runtime_stage_data.cc.
References impeller::kFloat, and type.
Referenced by impeller::compiler::ShaderBundleData::CreateFlatbuffer(), and impeller::compiler::RuntimeStageData::CreateStageFlatbuffer().
|
static |
|
static |
Definition at line 47 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 138 of file runtime_stage_data.cc.
References type.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
std::string impeller::compiler::ToLowerCase | ( | std::string_view | string | ) |
Definition at line 62 of file utilities.cc.
Referenced by SourceTypeFromString(), and impeller::compiler::Switches::Switches().
shaderc_shader_kind impeller::compiler::ToShaderCShaderKind | ( | SourceType | type | ) |
Definition at line 187 of file types.cc.
References kComputeShader, kFragmentShader, kUnknown, kVertexShader, and type.
Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV().
SourceLanguage impeller::compiler::ToSourceLanguage | ( | const std::string & | source_language | ) |
Definition at line 64 of file types.cc.
References kGLSL, kHLSL, and kUnknown.
Referenced by ParseShaderBundleConfig(), and impeller::compiler::Switches::Switches().
|
static |
Definition at line 33 of file runtime_stage_data.cc.
Referenced by impeller::compiler::ShaderBundleData::CreateFlatbuffer(), and impeller::compiler::RuntimeStageData::CreateStageFlatbuffer().
|
static |
Definition at line 41 of file shader_bundle_data.cc.
|
static |
Definition at line 575 of file reflector.cc.
References impeller::compiler::CompilerBackend::kGLSL, impeller::compiler::CompilerBackend::kGLSLVulkan, impeller::compiler::CompilerBackend::kMSL, impeller::compiler::CompilerBackend::kSkSL, and type.
|
static |
Definition at line 61 of file runtime_stage_data.cc.
References impeller::kFloat, impeller::kSampledImage, impeller::kStruct, and type.
Referenced by impeller::compiler::ShaderBundleData::CreateFlatbuffer(), and impeller::compiler::RuntimeStageData::CreateStageFlatbuffer().
|
static |
Definition at line 56 of file shader_bundle_data.cc.
References impeller::kFloat, impeller::kSampledImage, and type.
|
static |
std::string impeller::compiler::Utf8FromPath | ( | const std::filesystem::path & | path | ) |
Converts a native format path to a utf8 string.
This utility uses `path::u8string()` to convert native paths to utf8. If the given path doesn't match the underlying native path format, and the native path format isn't utf8 (i.e. Windows, which has utf16 paths), the path will get mangled.
Definition at line 30 of file utilities.cc.
Referenced by impeller::compiler::Switches::AreValid(), CreateReflectorOptions(), EntryPointFunctionNameFromSourceName(), GenerateShaderBundle(), InferShaderNameFromPath(), Main(), OutputDepfile(), OutputIPLR(), OutputReflectionData(), OutputSLFile(), and impeller::compiler::Switches::Switches().
|
static |
Definition at line 1202 of file reflector.cc.
References impeller::compiler::VertexType::base_type, impeller::compiler::VertexType::byte_length, type, impeller::compiler::VertexType::type_name, TypeNameWithPaddingOfSize(), and impeller::compiler::VertexType::variable_name.
|
static |
Definition at line 186 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
constexpr |
Definition at line 11 of file constants.h.
Referenced by CreateGLSLCompiler().
|
static |
Definition at line 20 of file switches.cc.
Referenced by impeller::compiler::Switches::PrintHelp(), and TargetPlatformFromCommandLine().
|
static |
Definition at line 28 of file switches.cc.
Referenced by impeller::compiler::Switches::PrintHelp(), and RuntimeStagesFromCommandLine().
|
static |
Definition at line 36 of file switches.cc.
Referenced by impeller::compiler::Switches::PrintHelp(), and SourceTypeFromCommandLine().
|
static |
Definition at line 38 of file compiler.cc.
Referenced by impeller::compiler::Compiler::Compiler().
|
constexpr |
Definition at line 202 of file code_gen_template.h.
|
constexpr |
Definition at line 10 of file code_gen_template.h.
|
static |
Definition at line 188 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 184 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 185 of file runtime_stage_data.cc.
|
static |
Definition at line 195 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 194 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 193 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 190 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 189 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 192 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 187 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 191 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().