diff options
| author | lucy96chen <47800040+lucy96chen@users.noreply.github.com> | 2022-10-17 17:38:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-17 17:38:59 -0700 |
| commit | 8add41a6e37994577d928bc312801ddfa1c33173 (patch) | |
| tree | 6ca5ef639a22c4e37c7287df1877cb5bf7ce691c /tools/gfx/renderer-shared.cpp | |
| parent | 09408e32d7c0ccebf38fe31b5d2ddf4b1cd128e4 (diff) | |
Shader cache index implementation (#2452)
Diffstat (limited to 'tools/gfx/renderer-shared.cpp')
| -rw-r--r-- | tools/gfx/renderer-shared.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp index f76fa2325..48cd6907f 100644 --- a/tools/gfx/renderer-shared.cpp +++ b/tools/gfx/renderer-shared.cpp @@ -6,7 +6,7 @@ #include "../../source/core/slang-file-system.h" #include "../../slang.h" -#include "../../source/slang/slang-hash-utils.h" +#include "../../source/core/slang-digest-util.h" using namespace Slang; @@ -368,7 +368,7 @@ Result RendererBase::getEntryPointCodeFromShaderCache( slang::Digest shaderKeyHash; program->computeDependencyBasedHash(entryPointIndex, targetIndex, &shaderKeyHash); - StringBuilder shaderKey = hashToString(shaderKeyHash); + String shaderKey = DigestUtil::toString(shaderKeyHash); // Produce a hash using the AST for this program - This is needed to check whether a cache entry is effectively dirty, // or to save along with the compiled code into an entry so the entry can be checked if fetched later on. @@ -463,6 +463,9 @@ IDevice* gfx::RendererBase::getInterface(const Guid& guid) SLANG_NO_THROW Result SLANG_MCALL RendererBase::initialize(const Desc& desc) { + // TODO: This logic for initalizing the shader cache has been replicated inside + // the constructor for ShaderCacheIndex. Remove when ShaderCacheIndex is integrated in. + // If a shader cache file system was provided, use the provided system. if (desc.shaderCacheFileSystem) { |
