validation: Reject nested shader IO structures

We previously rejected nested structures for entry point IO only if
there was an attribute on the member in the outer struct. This change
rejects all nested structures instead.

Change-Id: I0d30c8521141154a63915e6c6d8fa31bc23f310e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66520
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc
index 1323131..75b4a82 100644
--- a/src/resolver/resolver.cc
+++ b/src/resolver/resolver.cc
@@ -1594,6 +1594,12 @@
 
         if (IsValidationEnabled(
                 decos, ast::DisabledValidation::kEntryPointParameter)) {
+          if (is_struct_member && ty->Is<sem::Struct>()) {
+            AddError("nested structures cannot be used for entry point IO",
+                     source);
+            return false;
+          }
+
           if (!ty->Is<sem::Struct>() && !pipeline_io_attribute) {
             std::string err = "missing entry point IO attribute";
             if (!is_struct_member) {