#include <compiler_backend.h>
Definition at line 19 of file compiler_backend.h.
◆ Compiler
◆ GLSLCompiler
◆ MSLCompiler
◆ SkSLCompiler
◆ ExtendedResourceIndex
Enumerator |
---|
kPrimary | |
kSecondary | |
Definition at line 52 of file compiler_backend.h.
52 {
53 kPrimary,
54 kSecondary,
55 };
◆ Type
Enumerator |
---|
kMSL | |
kGLSL | |
kGLSLVulkan | |
kSkSL | |
Definition at line 25 of file compiler_backend.h.
25 {
26 kMSL,
28 kGLSLVulkan,
30 };
◆ CompilerBackend() [1/5]
impeller::compiler::CompilerBackend::CompilerBackend |
( |
MSLCompiler |
compiler | ) |
|
|
explicit |
◆ CompilerBackend() [2/5]
impeller::compiler::CompilerBackend::CompilerBackend |
( |
GLSLCompiler |
compiler | ) |
|
|
explicit |
◆ CompilerBackend() [3/5]
impeller::compiler::CompilerBackend::CompilerBackend |
( |
SkSLCompiler |
compiler | ) |
|
|
explicit |
◆ CompilerBackend() [4/5]
impeller::compiler::CompilerBackend::CompilerBackend |
( |
Type |
type, |
|
|
Compiler |
compiler |
|
) |
| |
◆ CompilerBackend() [5/5]
impeller::compiler::CompilerBackend::CompilerBackend |
( |
| ) |
|
|
default |
◆ ~CompilerBackend()
impeller::compiler::CompilerBackend::~CompilerBackend |
( |
| ) |
|
|
default |
◆ GetCompiler() [1/2]
spirv_cross::Compiler * impeller::compiler::CompilerBackend::GetCompiler |
( |
| ) |
|
Definition at line 70 of file compiler_backend.cc.
70 {
71 if (auto* msl = std::get_if<MSLCompiler>(&compiler_)) {
72 return msl->get();
73 }
74 if (auto* glsl = std::get_if<GLSLCompiler>(&compiler_)) {
75 return glsl->get();
76 }
77 if (auto* sksl = std::get_if<SkSLCompiler>(&compiler_)) {
78 return sksl->get();
79 }
80 return nullptr;
81}
◆ GetCompiler() [2/2]
const spirv_cross::Compiler * impeller::compiler::CompilerBackend::GetCompiler |
( |
| ) |
const |
Definition at line 54 of file compiler_backend.cc.
54 {
55 if (
auto compiler = GetGLSLCompiler()) {
57 }
58
59 if (
auto compiler = GetMSLCompiler()) {
61 }
62
63 if (
auto compiler = GetSkSLCompiler()) {
65 }
66
67 return nullptr;
68}
◆ GetExtendedMSLResourceBinding()
uint32_t impeller::compiler::CompilerBackend::GetExtendedMSLResourceBinding |
( |
ExtendedResourceIndex |
index, |
|
|
spirv_cross::ID |
id |
|
) |
| const |
Definition at line 35 of file compiler_backend.cc.
37 {
38 if (
auto compiler = GetMSLCompiler()) {
39 switch (index) {
41 return compiler->get_automatic_msl_resource_binding(
id);
43 return compiler->get_automatic_msl_resource_binding_secondary(
id);
44 break;
45 }
46 }
47 if (
auto compiler = GetGLSLCompiler()) {
48 return compiler->get_decoration(
id, spv::Decoration::DecorationBinding);
49 }
50 const auto kOOBIndex = static_cast<uint32_t>(-1);
51 return kOOBIndex;
52}
◆ GetType()
◆ operator bool()
impeller::compiler::CompilerBackend::operator bool |
( |
| ) |
const |
|
explicit |
◆ operator->()
const spirv_cross::Compiler * impeller::compiler::CompilerBackend::operator-> |
( |
| ) |
const |
The documentation for this struct was generated from the following files: