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

◆ hash_layout_config()

size_t MayaFlux::Core::VKDescriptorManager::hash_layout_config ( const DescriptorSetLayoutConfig config) const
private

Compute hash of descriptor set layout config.

Parameters
configLayout configuration
Returns
Hash value for cache lookup

Definition at line 178 of file VKDescriptorManager.cpp.

179{
180 size_t hash = 0;
181
182 auto hash_combine = [](size_t& seed, size_t value) {
183 seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2);
184 };
185
186 for (const auto& binding : config.bindings) {
187 hash_combine(hash, binding.binding);
188 hash_combine(hash, static_cast<size_t>(binding.type));
189 hash_combine(hash, binding.count);
190 hash_combine(hash, static_cast<uint32_t>(binding.stage_flags));
191 }
192
193 return hash;
194}

References MayaFlux::Core::DescriptorSetLayoutConfig::bindings.

Referenced by create_layout().

+ Here is the caller graph for this function: