MCPcopy Create free account
hub / github.com/defold/defold / Find

Method Find

engine/graphics/src/vulkan/graphics_vulkan_private.h:298–312  ·  view source on GitHub ↗

Returns the cached descriptor sets if binding_signature matches an entry with the current allocator generation, or null on miss.

Source from the content-addressed store, hash-verified

296 // Returns the cached descriptor sets if binding_signature matches
297 // an entry with the current allocator generation, or null on miss.
298 VkDescriptorSet* Find(uint64_t binding_signature, uint32_t allocator_generation, uint32_t descriptor_set_count)
299 {
300 for (uint8_t i = 0; i < DM_DESCRIPTOR_CACHE_SIZE; ++i)
301 {
302 DescriptorSetCacheEntry& e = m_Entries[i];
303 if (e.m_Valid &&
304 e.m_AllocatorGeneration == allocator_generation &&
305 e.m_BindingSignature == binding_signature &&
306 e.m_DescriptorSetCount == descriptor_set_count)
307 {
308 return e.m_DescriptorSets;
309 }
310 }
311 return 0x0;
312 }
313
314 // Insert a new cache entry, overwriting the oldest slot.
315 void Insert(uint64_t binding_signature, uint32_t allocator_generation, uint32_t descriptor_set_count, VkDescriptorSet* sets)

Callers 1

CommitUniformsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected