MayaFlux 1.0.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 1409 of file BackendResoureManager.cpp.

1410{
1411 size_t hash = 0;
1412 auto hash_combine = [](size_t& seed, size_t value) {
1413 seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2);
1414 };
1415
1416 hash_combine(hash, static_cast<size_t>(filter));
1417 hash_combine(hash, static_cast<size_t>(address_mode));
1418 hash_combine(hash, std::hash<float> {}(max_anisotropy));
1419
1420 return hash;
1421}
glm::vec3 value
void hash_combine(size_t &seed, size_t value)
Combine a hash into an existing seed, FNV-style.
Definition VisionOp.hpp:594

References value.