Namespaces | |
| testing | |
Classes | |
| class | AutoLogger |
| class | Compiler |
| struct | CompilerBackend |
| class | CompilerSkSL |
| struct | IncludeDir |
| class | Includer |
| struct | IncluderData |
| struct | KnownType |
| class | Reflector |
| class | RuntimeStageData |
| struct | SourceOptions |
| class | SPIRVCompiler |
| struct | SPIRVCompilerOptions |
| struct | SPIRVCompilerSourceProfile |
| struct | SPIRVCompilerTargetEnv |
| struct | StructMember |
| struct | Switches |
| struct | UniformDescription |
| 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 | VertexType |
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 bool | SetPermissiveAccess (const std::filesystem::path &p) |
| bool | Main (const fml::CommandLine &command_line) |
| static std::string | BaseTypeToString (spirv_cross::SPIRType::BaseType type) |
| static std::string | ExecutionModelToString (spv::ExecutionModel model) |
| static std::string | StringToShaderStage (std::string str) |
| 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< uint32_t > | ToJsonStage (spv::ExecutionModel stage) |
| static std::optional< fb::TargetPlatform > | ToTargetPlatform (TargetPlatform platform) |
| static std::optional< uint32_t > | ToJsonTargetPlatform (TargetPlatform platform) |
| static std::optional< fb::UniformDataType > | ToType (spirv_cross::SPIRType::BaseType type) |
| static std::optional< uint32_t > | ToJsonType (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 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) |
| 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) |
| 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 | ConvertToCamelCase (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 |
| 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 = "sksl" |
| 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, SourceType > | kKnownSourceTypes |
|
strong |
|
strong |
|
strong |
|
static |
| std::string impeller::compiler::ConvertToCamelCase | ( | std::string_view | string | ) |
Definition at line 23 of file utilities.cc.
| 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 46 of file utilities.cc.
Referenced by EntryPointFunctionNameFromSourceName(), and impeller::compiler::testing::TEST().
|
static |
Definition at line 200 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, 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 129 of file compiler.cc.
References impeller::compiler::SourceOptions::gles_language_version, kExternalTexturePrefix, kOpenGLES, kRuntimeStageGLES, StringStartsWith(), and impeller::compiler::SourceOptions::target_platform.
Referenced by CreateCompiler().
|
static |
Definition at line 50 of file compiler.cc.
Referenced by CreateCompiler(), and CreateVulkanCompiler().
|
static |
|
static |
Definition at line 115 of file compiler.cc.
References CreateMSLCompiler().
Referenced by CreateCompiler().
| std::string impeller::compiler::EntryPointFunctionNameFromSourceName | ( | const std::string & | file_name, |
| SourceType | type, | ||
| SourceLanguage | source_language, | ||
| const std::string & | entry_point_name | ||
| ) |
Definition at line 90 of file types.cc.
References ConvertToEntrypointName(), kComputeShader, kFragmentShader, kHLSL, kTessellationControlShader, kTessellationEvaluationShader, kUnknown, kVertexShader, and Utf8FromPath().
Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), and Main().
|
static |
Definition at line 181 of file compiler.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by CreateCompiler().
|
static |
Definition at line 73 of file reflector.cc.
|
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 579 of file reflector.cc.
| std::string impeller::compiler::InferShaderNameFromPath | ( | std::string_view | path | ) |
|
static |
Definition at line 447 of file compiler.cc.
Referenced by impeller::compiler::Compiler::CreateDepfileContents().
| bool impeller::compiler::Main | ( | const fml::CommandLine & | command_line | ) |
Definition at line 39 of file impellerc_main.cc.
References impeller::compiler::Switches::AreValid(), impeller::compiler::Compiler::CreateDepfileContents(), impeller::compiler::SourceOptions::defines, impeller::compiler::Switches::defines, impeller::compiler::Switches::depfile_path, impeller::compiler::Switches::entry_point, impeller::compiler::SourceOptions::entry_point_name, impeller::compiler::Reflector::Options::entry_point_name, EntryPointFunctionNameFromSourceName(), impeller::compiler::SourceOptions::file_name, impeller::compiler::Compiler::GetErrorMessages(), impeller::compiler::Reflector::GetReflectionCC(), impeller::compiler::Reflector::GetReflectionHeader(), impeller::compiler::Reflector::GetReflectionJSON(), impeller::compiler::Compiler::GetReflector(), impeller::compiler::Reflector::GetRuntimeStageData(), impeller::compiler::Compiler::GetSLShaderSource(), impeller::compiler::Compiler::GetSPIRVAssembly(), impeller::compiler::SourceOptions::gles_language_version, impeller::compiler::Switches::gles_language_version, impeller::compiler::Reflector::Options::header_file_name, impeller::compiler::Switches::include_directories, impeller::compiler::SourceOptions::include_dirs, InferShaderNameFromPath(), impeller::compiler::Switches::input_type, impeller::compiler::Switches::iplr, impeller::compiler::Compiler::IsValid(), impeller::compiler::SourceOptions::json_format, impeller::compiler::Switches::json_format, kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, kVulkan, impeller::compiler::SourceOptions::metal_version, impeller::compiler::Switches::metal_version, impeller::compiler::Switches::PrintHelp(), impeller::compiler::Switches::reflection_cc_name, impeller::compiler::Switches::reflection_header_name, impeller::compiler::Switches::reflection_json_name, SetPermissiveAccess(), impeller::compiler::Reflector::Options::shader_name, impeller::compiler::Switches::sl_file_name, impeller::compiler::Switches::source_file_name, impeller::compiler::SourceOptions::source_language, impeller::compiler::Switches::source_language, SourceTypeFromFileName(), impeller::compiler::Switches::spirv_file_name, impeller::compiler::Switches::target_platform, impeller::compiler::SourceOptions::target_platform, impeller::compiler::Reflector::Options::target_platform, TargetPlatformBundlesSkSL(), TargetPlatformNeedsReflection(), impeller::compiler::SourceOptions::type, impeller::compiler::SourceOptions::use_half_textures, impeller::compiler::Switches::use_half_textures, Utf8FromPath(), impeller::compiler::Switches::working_directory, and impeller::compiler::SourceOptions::working_directory.
Referenced by main().
|
static |
Definition at line 27 of file compiler.cc.
|
static |
| void impeller::compiler::report_and_exit | ( | const std::string & | msg | ) |
Definition at line 16 of file spirv_sksl.cc.
|
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.
Referenced by impeller::compiler::SPIRVCompilerOptions::BuildShadercOptions().
|
static |
| std::string impeller::compiler::ShaderCErrorToString | ( | shaderc_compilation_status | status | ) |
Definition at line 144 of file types.cc.
Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV().
| std::string impeller::compiler::SourceLanguageToString | ( | SourceLanguage | source_language | ) |
|
static |
| SourceType impeller::compiler::SourceTypeFromFileName | ( | const std::string & | file_name | ) |
Definition at line 29 of file types.cc.
References kComputeShader, kFragmentShader, kTessellationControlShader, kTessellationEvaluationShader, kUnknown, kVertexShader, and StringEndWith().
Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), Main(), and impeller::compiler::testing::TEST().
| std::string impeller::compiler::SourceTypeToString | ( | SourceType | type | ) |
Definition at line 225 of file types.cc.
References kComputeShader, kFragmentShader, kTessellationControlShader, kTessellationEvaluationShader, kUnknown, and kVertexShader.
|
static |
| bool impeller::compiler::StringStartsWith | ( | const std::string & | target, |
| const std::string & | prefix | ||
| ) |
|
static |
Definition at line 90 of file reflector.cc.
| bool impeller::compiler::TargetPlatformBundlesSkSL | ( | TargetPlatform | platform | ) |
Definition at line 317 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by Main().
|
static |
| bool impeller::compiler::TargetPlatformIsMetal | ( | TargetPlatform | platform | ) |
Definition at line 281 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::testing::TEST_P().
| bool impeller::compiler::TargetPlatformIsOpenGL | ( | TargetPlatform | platform | ) |
Definition at line 263 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
| bool impeller::compiler::TargetPlatformIsVulkan | ( | TargetPlatform | platform | ) |
Definition at line 299 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::testing::TEST_P().
| bool impeller::compiler::TargetPlatformNeedsReflection | ( | TargetPlatform | platform | ) |
Definition at line 126 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::testing::CompilerTest::CanCompileAndReflect(), and Main().
| std::string impeller::compiler::TargetPlatformSLExtension | ( | TargetPlatform | platform | ) |
Definition at line 243 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, 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 205 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
| std::string impeller::compiler::TargetPlatformToString | ( | TargetPlatform | platform | ) |
Definition at line 53 of file types.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
| spv::ExecutionModel impeller::compiler::ToExecutionModel | ( | SourceType | type | ) |
Definition at line 187 of file types.cc.
References kComputeShader, kFragmentShader, kTessellationControlShader, kTessellationEvaluationShader, kUnknown, and kVertexShader.
Referenced by CreateCompiler().
|
static |
Definition at line 57 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 97 of file runtime_stage_data.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 163 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
| shaderc_shader_kind impeller::compiler::ToShaderCShaderKind | ( | SourceType | type | ) |
Definition at line 169 of file types.cc.
References kComputeShader, kFragmentShader, kTessellationControlShader, kTessellationEvaluationShader, kUnknown, and kVertexShader.
Referenced by impeller::compiler::SPIRVCompiler::CompileToSPV().
|
static |
Definition at line 39 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateMapping().
|
static |
Definition at line 368 of file reflector.cc.
References impeller::compiler::CompilerBackend::kGLSL, impeller::compiler::CompilerBackend::kMSL, and impeller::compiler::CompilerBackend::kSkSL.
|
static |
Definition at line 75 of file runtime_stage_data.cc.
References kMetalDesktop, kMetalIOS, kOpenGLDesktop, kOpenGLES, kRuntimeStageGLES, kRuntimeStageMetal, kRuntimeStageVulkan, kSkSL, kUnknown, and kVulkan.
Referenced by impeller::compiler::RuntimeStageData::CreateMapping().
|
static |
Definition at line 118 of file runtime_stage_data.cc.
References impeller::kBoolean, impeller::kDouble, impeller::kFloat, impeller::kHalfFloat, impeller::kSampledImage, impeller::kSignedByte, impeller::kSignedInt, impeller::kSignedInt64, impeller::kSignedShort, impeller::kUnsignedByte, impeller::kUnsignedInt, impeller::kUnsignedInt64, and impeller::kUnsignedShort.
Referenced by impeller::compiler::RuntimeStageData::CreateMapping().
|
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 14 of file utilities.cc.
Referenced by impeller::compiler::Switches::AreValid(), EntryPointFunctionNameFromSourceName(), InferShaderNameFromPath(), Main(), impeller::scene::importer::Main(), and impeller::compiler::Switches::Switches().
|
static |
|
static |
Definition at line 210 of file runtime_stage_data.cc.
|
constexpr |
Definition at line 10 of file constants.h.
Referenced by CreateGLSLCompiler().
|
static |
Definition at line 19 of file switches.cc.
Referenced by impeller::compiler::Switches::PrintHelp(), and TargetPlatformFromCommandLine().
|
static |
Definition at line 31 of file switches.cc.
Referenced by impeller::compiler::Switches::PrintHelp(), and SourceTypeFromCommandLine().
|
constexpr |
Definition at line 198 of file code_gen_template.h.
|
constexpr |
Definition at line 10 of file code_gen_template.h.
|
static |
Definition at line 212 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 208 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 209 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 219 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 218 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 217 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 214 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 213 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 216 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 211 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().
|
static |
Definition at line 215 of file runtime_stage_data.cc.
Referenced by impeller::compiler::RuntimeStageData::CreateJsonMapping().