MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ compute_sampler_hash()

size_t MayaFlux::Core::BackendResourceManager::compute_sampler_hash ( vk::Filter  filter,
vk::SamplerAddressMode  address_mode,
float  max_anisotropy 
) const
private

Definition at line 1166 of file BackendResoureManager.cpp.

1167{
1168 size_t hash = 0;
1169 auto hash_combine = [](size_t& seed, size_t value) {
1170 seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2);
1171 };
1172
1173 hash_combine(hash, static_cast<size_t>(filter));
1174 hash_combine(hash, static_cast<size_t>(address_mode));
1175 hash_combine(hash, std::hash<float> {}(max_anisotropy));
1176
1177 return hash;
1178}
float value
void hash_combine(size_t &seed, size_t value)
Combine a hash into an existing seed, FNV-style.
Definition VisionOp.hpp:357

References value.