llpc/util/llpcCacheAccessor.cpp
CacheAccessor::CacheAccessor(Context *context, MetroHash::Hash &cacheHash, CachePair internalCaches) {
  assert(context);
  if (context->isGraphics()) {
    const auto *pipelineInfo = reinterpret_cast<const GraphicsPipelineBuildInfo *>(context->getPipelineBuildInfo());
    initializeUsingBuildInfo(pipelineInfo, cacheHash, internalCaches);
  } else {
    const auto *pipelineInfo = reinterpret_cast<const ComputePipelineBuildInfo *>(context->getPipelineBuildInfo());
    initializeUsingBuildInfo(pipelineInfo, cacheHash, internalCaches);
  }
}
// =====================================================================================================================
// Access the given caches using the hash.
//
// @param context : The context that will give the caches from the application.
// @param hash : The hash for the entry to access.
// @param internalCaches : The internal caches to check.
Access the given caches using the hash.
Access the given caches using the hash .
CacheAccessor::CacheAccessor(Context *context, MetroHash::Hash &cacheHash, CachePair internalCaches) {
  assert(context);
  if (context->isGraphics()) {
    const auto *pipelineInfo = reinterpret_cast<const GraphicsPipelineBuildInfo *>(context->getPipelineBuildInfo());
    initializeUsingBuildInfo(pipelineInfo, cacheHash, internalCaches);
  } else {
    const auto *pipelineInfo = reinterpret_cast<const ComputePipelineBuildInfo *>(context->getPipelineBuildInfo());
    initializeUsingBuildInfo(pipelineInfo, cacheHash, internalCaches);
  }
}
CacheAccessor :: CacheAccessor ( Context * context , MetroHash :: Hash & cacheHash , CachePair internalCaches ) { assert ( context ) ; if ( context -> isGraphics ( ) ) { const auto * pipelineInfo = reinterpret_cast < const GraphicsPipelineBuildInfo * > ( context -> getPipelineBuildInfo ( ) ) ; initializeUsingBuildInfo ( pipelineInfo , cacheHash , internalCaches ) ; } else { const auto * pipelineInfo = reinterpret_cast < const ComputePipelineBuildInfo * > ( context -> getPipelineBuildInfo ( ) ) ; initializeUsingBuildInfo ( pipelineInfo , cacheHash , internalCaches ) ; } }
Access the given caches using the hash.
Access the given caches using the hash .