28 std::vector<ValidationError>
validate(
void)
const override
30 std::vector<ValidationError> errors;
33 errors.emplace_back(
"No entries in the bind group layout",
34 fmt::format(
"BindGroupLayout({})", this->
getName()),
38 for (
const auto &entry : this->
entries)
40 auto entryErrors = entry->validate();
41 for (
const auto &error : entryErrors)
43 errors.emplace_back(error.message,
44 fmt::format(
"BindGroupLayout::{}::{}", error.location, entry->getName()),
48 for (uint32_t i = 0; i < this->entries.size(); i++)
50 const auto &entry = this->entries[i];
51 for (uint32_t j = i + 1; j < this->entries.size(); j++)
53 const auto &otherEntry = this->entries[j];
54 if (entry->getEntry().binding == otherEntry->getEntry().binding)
56 errors.emplace_back(fmt::format(
"Binding {} is duplicated between entries '{}' and '{}'",
57 entry->getEntry().binding, entry->getName(), otherEntry->getName()),
58 fmt::format(
"BindGroupLayout({})", this->getName()),
61 if (entry->getName() == otherEntry->getName())
63 errors.emplace_back(fmt::format(
"Entry name '{}' is duplicated between entries at index {} and {}",
64 entry->getName(), i, j),
65 fmt::format(
"BindGroupLayout({})", this->getName()),