37 spirv_cross::ID
id)
const {
38 if (
auto compiler = GetMSLCompiler()) {
41 return compiler->get_automatic_msl_resource_binding(
id);
43 return compiler->get_automatic_msl_resource_binding_secondary(
id);
47 if (
auto compiler = GetGLSLCompiler()) {
48 return compiler->get_decoration(
id, spv::Decoration::DecorationBinding);
50 const auto kOOBIndex =
static_cast<uint32_t
>(-1);
55 if (
auto compiler = GetGLSLCompiler()) {
59 if (
auto compiler = GetMSLCompiler()) {
63 if (
auto compiler = GetSkSLCompiler()) {
71 if (
auto* msl = std::get_if<MSLCompiler>(&compiler_)) {
74 if (
auto* glsl = std::get_if<GLSLCompiler>(&compiler_)) {
77 if (
auto* sksl = std::get_if<SkSLCompiler>(&compiler_)) {
83const spirv_cross::CompilerMSL* CompilerBackend::GetMSLCompiler()
const {
84 if (
auto* msl = std::get_if<MSLCompiler>(&compiler_)) {
90const spirv_cross::CompilerGLSL* CompilerBackend::GetGLSLCompiler()
const {
91 if (
auto* glsl = std::get_if<GLSLCompiler>(&compiler_)) {
97const CompilerSkSL* CompilerBackend::GetSkSLCompiler()
const {
98 if (
auto* sksl = std::get_if<SkSLCompiler>(&compiler_)) {
104CompilerBackend::operator bool()
const {
105 return !!GetCompiler();
std::shared_ptr< CompilerSkSL > SkSLCompiler
const spirv_cross::Compiler * operator->() const
spirv_cross::Compiler * GetCompiler()
std::shared_ptr< spirv_cross::CompilerGLSL > GLSLCompiler
std::shared_ptr< spirv_cross::CompilerMSL > MSLCompiler
uint32_t GetExtendedMSLResourceBinding(ExtendedResourceIndex index, spirv_cross::ID id) const
std::variant< MSLCompiler, GLSLCompiler, SkSLCompiler > Compiler