llpc/util/llpcCacheAccessor.cpp
Result CacheAccessor::lookUpInCache(Vkgc::ICache *cache, bool allocateOnMiss, const Vkgc::HashId &hashId) {
  Vkgc::EntryHandle currentEntry;
  Result cacheResult = cache->GetEntry(hashId, allocateOnMiss, &currentEntry);

  if (cacheResult == Result::NotReady)
    cacheResult = currentEntry.WaitForEntry();

  if (cacheResult == Result::Success) {
    cacheResult = currentEntry.GetValueZeroCopy(&m_elf.pCode, &m_elf.codeSize);
    m_cacheEntry = std::move(currentEntry);
  } else if (allocateOnMiss && (cacheResult == Result::NotFound)) {
    m_cacheEntry = std::move(currentEntry);
  }
  return cacheResult;
}
// =====================================================================================================================
// Looks for the given hash in the given cache and sets the cache accessor state with the results.  A new entry
// will be allocated if there is a cache miss and allocateOnMiss is true.
//
// @param hash : The hash to look up.
// @param allocateOnMiss : Will add an entry to the cache on a miss if true.
// @param cache : The cache in which to look.
Looks for the given hash in the given cache and sets the cache accessor state with the results.  A new entry
will be allocated if there is a cache miss and allocateOnMiss is true.
Looks for the given hash in the given cache and sets the cache accessor state with the results . A new entry will be allocated if there is a cache miss and allocateOnMiss is true .
Result CacheAccessor::lookUpInCache(Vkgc::ICache *cache, bool allocateOnMiss, const Vkgc::HashId &hashId) {
  Vkgc::EntryHandle currentEntry;
  Result cacheResult = cache->GetEntry(hashId, allocateOnMiss, &currentEntry);
  if (cacheResult == Result::NotReady)
    cacheResult = currentEntry.WaitForEntry();
  if (cacheResult == Result::Success) {
    cacheResult = currentEntry.GetValueZeroCopy(&m_elf.pCode, &m_elf.codeSize);
    m_cacheEntry = std::move(currentEntry);
  } else if (allocateOnMiss && (cacheResult == Result::NotFound)) {
    m_cacheEntry = std::move(currentEntry);
  }
  return cacheResult;
}
Result CacheAccessor :: lookUpInCache ( Vkgc :: ICache * cache , bool allocateOnMiss , const Vkgc :: HashId & hashId ) { Vkgc :: EntryHandle currentEntry ; Result cacheResult = cache -> GetEntry ( hashId , allocateOnMiss , & currentEntry ) ; if ( cacheResult == Result :: NotReady ) cacheResult = currentEntry . WaitForEntry ( ) ; if ( cacheResult == Result :: Success ) { cacheResult = currentEntry . GetValueZeroCopy ( & m_elf . pCode , & m_elf . codeSize ) ; m_cacheEntry = std :: move ( currentEntry ) ; } else if ( allocateOnMiss && ( cacheResult == Result :: NotFound ) ) { m_cacheEntry = std :: move ( currentEntry ) ; } return cacheResult ; }
Looks for the given hash in the given cache and sets the cache accessor state with the results.
Looks for the given hash in the given cache and sets the cache accessor state with the results .