llpc/util/llpcCacheAccessor.cpp
void CacheAccessor::lookUpInCaches(const MetroHash::Hash &hash) {
  Vkgc::HashId hashId = {};
  memcpy(&hashId.bytes, &hash.bytes, sizeof(hash));

  Result cacheResult = Result::Unsupported;
  if (getInternalCache()) {
    cacheResult = lookUpInCache(getInternalCache(), !getApplicationCache(), hashId);
    if (cacheResult == Result::Success)
      m_internalCacheHit = true;
  }
  if (getApplicationCache() && cacheResult != Result::Success)
    cacheResult = lookUpInCache(getApplicationCache(), true, hashId);
  m_cacheResult = cacheResult;
}
// =====================================================================================================================
// Looks for the given hash in the ICaches and sets the cache accessor state with the results.
//
// @param hash : The hash to look up.
Looks for the given hash in the ICaches and sets the cache accessor state with the results.
Looks for the given hash in the ICaches and sets the cache accessor state with the results .
void CacheAccessor::lookUpInCaches(const MetroHash::Hash &hash) {
  Vkgc::HashId hashId = {};
  memcpy(&hashId.bytes, &hash.bytes, sizeof(hash));
  Result cacheResult = Result::Unsupported;
  if (getInternalCache()) {
    cacheResult = lookUpInCache(getInternalCache(), !getApplicationCache(), hashId);
    if (cacheResult == Result::Success)
      m_internalCacheHit = true;
  }
  if (getApplicationCache() && cacheResult != Result::Success)
    cacheResult = lookUpInCache(getApplicationCache(), true, hashId);
  m_cacheResult = cacheResult;
}
void CacheAccessor :: lookUpInCaches ( const MetroHash :: Hash & hash ) { Vkgc :: HashId hashId = { } ; memcpy ( & hashId . bytes , & hash . bytes , sizeof ( hash ) ) ; Result cacheResult = Result :: Unsupported ; if ( getInternalCache ( ) ) { cacheResult = lookUpInCache ( getInternalCache ( ) , ! getApplicationCache ( ) , hashId ) ; if ( cacheResult == Result :: Success ) m_internalCacheHit = true ; } if ( getApplicationCache ( ) && cacheResult != Result :: Success ) cacheResult = lookUpInCache ( getApplicationCache ( ) , true , hashId ) ; m_cacheResult = cacheResult ; }
Looks for the given hash in the ICaches and sets the cache accessor state with the results.
Looks for the given hash in the ICaches and sets the cache accessor state with the results .