Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions impeller/compiler/spirv_sksl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ bool CompilerSkSL::emit_struct_resources() {
}

void CompilerSkSL::detect_unsupported_resources() {
// UBOs and SSBOs are not supported.
for (auto& id : ir.ids) {
if (id.get_type() == TypeVariable) {
auto& var = id.get<SPIRVariable>();
auto& type = get<SPIRType>(var.basetype);

// UBOs and SSBOs are not supported.
if (var.storage != StorageClassFunction && type.pointer &&
type.storage == StorageClassUniform && !is_hidden_variable(var) &&
(ir.meta[type.self].decoration.decoration_flags.get(
Expand All @@ -192,19 +192,20 @@ void CompilerSkSL::detect_unsupported_resources() {
FLUTTER_CROSS_THROW("SkSL does not support UBOs or SSBOs: '" +
get_name(var.self) + "'");
}
}
}

// Push constant blocks are not supported.
for (auto& id : ir.ids) {
if (id.get_type() == TypeVariable) {
auto& var = id.get<SPIRVariable>();
auto& type = get<SPIRType>(var.basetype);
// Push constant blocks are not supported.
if (!is_hidden_variable(var) && var.storage != StorageClassFunction &&
type.pointer && type.storage == StorageClassPushConstant) {
FLUTTER_CROSS_THROW("SkSL does not support push constant blocks: '" +
get_name(var.self) + "'");
}

// User specified inputs are not supported.
if (!is_hidden_variable(var) && var.storage != StorageClassFunction &&
type.pointer && type.storage == StorageClassInput) {
FLUTTER_CROSS_THROW("SkSL does not support inputs: '" +
get_name(var.self) + "'");
}
}
}
}
Expand Down