[msl] Reject modules that use input_attachments These are not supported by the MSL backend. Fixed: 451278799 Change-Id: I1c1de3917394df05653dd839ca3913e12240ccfe Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/267274 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/src/tint/lang/msl/writer/writer.cc b/src/tint/lang/msl/writer/writer.cc index 73f4981..fb1e2c1 100644 --- a/src/tint/lang/msl/writer/writer.cc +++ b/src/tint/lang/msl/writer/writer.cc
@@ -61,6 +61,9 @@ if (ty->Is<core::type::ResourceBinding>()) { return Failure("resource_binding not supported by the MSL backend"); } + if (ty->Is<core::type::InputAttachment>()) { + return Failure("input_attachment not supported by the MSL backend"); + } } // Check for unsupported module-scope variable address spaces and types and ensure at most one @@ -71,9 +74,6 @@ if (ptr->AddressSpace() == core::AddressSpace::kPixelLocal) { return Failure("pixel_local address space is not supported by the MSL backend"); } - if (ptr->StoreType()->Is<core::type::InputAttachment>()) { - return Failure("input attachments are not supported by the MSL backend"); - } } auto user_immediate_res = core::ir::ValidateSingleUserImmediate(ir);