mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 02:15:43 +00:00
Use TypedInteger for BindGroupIndex
Bug: dawn:442 Change-Id: I889a943cbaf2d349c31a15fdf126d66964bdd0a7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23247 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
e5d94c31a0
commit
250f26229b
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "common/Platform.h"
|
||||
#include "common/TypedInteger.h"
|
||||
#include "common/ityp_bitset.h"
|
||||
|
||||
#include <bitset>
|
||||
#include <functional>
|
||||
@@ -87,4 +88,14 @@ size_t Hash(const std::bitset<N>& value) {
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace std {
|
||||
template <typename Index, size_t N>
|
||||
class hash<ityp::bitset<Index, N>> {
|
||||
public:
|
||||
size_t operator()(const ityp::bitset<Index, N>& value) const {
|
||||
return Hash(static_cast<const std::bitset<N>&>(value));
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
#endif // COMMON_HASHUTILS_H_
|
||||
|
||||
Reference in New Issue
Block a user