message: Use the binding mask for BGL hashing and comparison
diff: #include "backend/BindGroupLayout.h"
  #include "backend/Device.h"
  +#include "common/BitSetIterator.h"
  #include "common/HashUtils.h"
  #include <functional>
  @@ -25,11 +26,9 @@ namespace backend {
  size_t HashBindingInfo(const BindGroupLayoutBase::LayoutBindingInfo& info) {
  size_t hash = Hash(info.mask);
  - for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) {
  - if (info.mask[binding]) {
  + for (uint32_t binding : IterateBitSet(info.mask)) {
  HashCombine(&hash, info.visibilities[binding], info.types[binding]);
  }
  - }
  return hash;
  }
  @@ -40,16 +39,11 @@ namespace backend {
  return false;
  }
  - for (size_t binding = 0; binding < kMaxBindingsPerGroup; ++binding) {
  - if (a.mask[binding]) {
  - if (a.visibilities[binding] != b.visibilities[binding]) {
  - return false;
  - }
  - if (a.types[binding] != b.types[binding]) {
  + for (uint32_t binding : IterateBitSet(a.mask)) {
  + if ((a.visibilities[binding] != b.visibilities[binding]) || (a.types[binding] != b.types[binding])) {
  return false;
  }
  }
  - }
  return true;
  }
  