[wgsl] Remove kBindingPointCollision validation override This was used to allow multiple resource variables to use the same binding point in some of the AST backends, which no longer exist. Change-Id: I5a2c9216144a64b6417a36536a25742b84a43e8f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/250816 Auto-Submit: James Price <jrprice@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/wgsl/ast/disable_validation_attribute.cc b/src/tint/lang/wgsl/ast/disable_validation_attribute.cc index 09aeae1..d49f017 100644 --- a/src/tint/lang/wgsl/ast/disable_validation_attribute.cc +++ b/src/tint/lang/wgsl/ast/disable_validation_attribute.cc
@@ -44,8 +44,6 @@ switch (validation) { case DisabledValidation::kFunctionHasNoBody: return "disable_validation__function_has_no_body"; - case DisabledValidation::kBindingPointCollision: - return "disable_validation__binding_point_collision"; case DisabledValidation::kIgnoreStrideAttribute: return "disable_validation__ignore_stride"; }
diff --git a/src/tint/lang/wgsl/ast/disable_validation_attribute.h b/src/tint/lang/wgsl/ast/disable_validation_attribute.h index f65e214..3e5130c 100644 --- a/src/tint/lang/wgsl/ast/disable_validation_attribute.h +++ b/src/tint/lang/wgsl/ast/disable_validation_attribute.h
@@ -41,8 +41,6 @@ kFunctionHasNoBody, /// When applied to a module-scoped variable, the validator will not complain if two resource /// variables have the same binding points. - kBindingPointCollision, - /// When applied to a member attribute, a stride attribute may be applied to non-array types. kIgnoreStrideAttribute, };
diff --git a/src/tint/lang/wgsl/resolver/validator.cc b/src/tint/lang/wgsl/resolver/validator.cc index 9495cb1..cc1f091 100644 --- a/src/tint/lang/wgsl/resolver/validator.cc +++ b/src/tint/lang/wgsl/resolver/validator.cc
@@ -1548,12 +1548,8 @@ if (!bp) { continue; } - if (auto added = binding_points.Add(*bp, var_decl); - !added && - IsValidationEnabled(decl->attributes, - ast::DisabledValidation::kBindingPointCollision) && - IsValidationEnabled(added.value->attributes, - ast::DisabledValidation::kBindingPointCollision)) { + auto added = binding_points.Add(*bp, var_decl); + if (!added) { // https://gpuweb.github.io/gpuweb/wgsl/#resource-interface // Bindings must not alias within a shader stage: two different variables in the // resource interface of a given shader must not have the same group and binding values,