llpc/util/llpcCacheAccessor.cpp
void CacheAccessor::updateShaderCache(BinaryData &elf) {
  ShaderCache *shaderCache = m_shaderCache;
  if (!m_shaderCacheEntry)
    return;

  if (!shaderCache)
    shaderCache = static_cast<ShaderCache *>(getInternalShaderCache());

  if (elf.pCode) {
    assert(elf.codeSize > 0);
    shaderCache->insertShader(m_shaderCacheEntry, elf.pCode, elf.codeSize);
  } else
    shaderCache->resetShader(m_shaderCacheEntry);
}
// =====================================================================================================================
// Updates the entry in the shader cache, if there is one, for this access.
//
// @param elf : The binary encoding of the elf to place in the cache.
Updates the entry in the shader cache, if there is one, for this access.
Updates the entry in the shader cache if there is one for this access .
void CacheAccessor::updateShaderCache(BinaryData &elf) {
  ShaderCache *shaderCache = m_shaderCache;
  if (!m_shaderCacheEntry)
    return;
  if (!shaderCache)
    shaderCache = static_cast<ShaderCache *>(getInternalShaderCache());
  if (elf.pCode) {
    assert(elf.codeSize > 0);
    shaderCache->insertShader(m_shaderCacheEntry, elf.pCode, elf.codeSize);
  } else
    shaderCache->resetShader(m_shaderCacheEntry);
}
void CacheAccessor :: updateShaderCache ( BinaryData & elf ) { ShaderCache * shaderCache = m_shaderCache ; if ( ! m_shaderCacheEntry ) return ; if ( ! shaderCache ) shaderCache = static_cast < ShaderCache * > ( getInternalShaderCache ( ) ) ; if ( elf . pCode ) { assert ( elf . codeSize > 0 ) ; shaderCache -> insertShader ( m_shaderCacheEntry , elf . pCode , elf . codeSize ) ; } else shaderCache -> resetShader ( m_shaderCacheEntry ) ; }
Updates the entry in the shader cache, if there is one, for this access.
Updates the entry in the shader cache if there is one for this access .