diff options
| author | lucy96chen <47800040+lucy96chen@users.noreply.github.com> | 2022-10-13 16:00:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-13 16:00:05 -0700 |
| commit | e03026a07c4aa32c1a2de5ce199d910d74511c27 (patch) | |
| tree | ddf2282242353a3daabe01a6836365e8dc02a5fc /source/core | |
| parent | 09054f7ae00aad0458de465a7f0b780a91c694dd (diff) | |
Add getVersionString() to IDownstreamCompiler (#2446)
* checkpoint
* Added shaderCachePath field to IDevice desc in gfx.slang, gfx-smoke.slang should be functional
* ran premake
* Added getVersionString() to IDownstreamCompiler and implemented it in DownstreamCompilerBase, GlslangDownstreamCompiler, and DXCDownstreamCompiler
* Added hashInto to Val and implemented for all subtypes which contain _getHashCodeOverride implementations; nothing hooked up to caching yet
* Revert erroneous commits from rebasing
* Re-ran premake.bat; changed hashInto implementations to _hashIntoOverride
* downstream compiler getVersionString hooked up into shader cache
* Rebuild CI, Win32 Release builds successfully locally
* Rebuild CI, Win32 and x64 Release build successfully locally
* Reverted Val::hashInto changes, deferred for later; modified init() for downstream compilers to fetch, hash, and save the hashes of their corresponding dlls (currently implemented for glslang and dxc), changed getVersionString() to directly return the saved hash for key computation
* call site changes post-merge; fixing CI build failures
* Removed remaining hashInto; Updated hashToString to produce string one byte at a time
* Fixed expected output to match new hashToString output order
* Missed string edit in hashing related unit tests
* Updated dxcapi.h; Replaced getVersionString implementation in glslang with the shared library timestamp, dxc implementation queries for IDxcVersionInfo and IDxcVersionInfo2 then fetches and returns the relevant values
* Fixing CI build failures
* Changed RawBlob to StringBlob for strings
* Modified getVersionString for dxc to always return either the version plus commit hash or shared library timestamp
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-md5.cpp | 5 | ||||
| -rw-r--r-- | source/core/slang-md5.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/core/slang-md5.cpp b/source/core/slang-md5.cpp index 95b4816bf..7371b21d2 100644 --- a/source/core/slang-md5.cpp +++ b/source/core/slang-md5.cpp @@ -232,6 +232,11 @@ namespace Slang update(ctx, hash.values, sizeof(hash.values)); } + void MD5HashGen::update(MD5Context* ctx, ISlangBlob* blob) + { + update(ctx, blob->getBufferPointer(), blob->getBufferSize()); + } + void MD5HashGen::update(MD5Context* ctx, const void* data, SlangInt size) { MD5_u32plus saved_lo; diff --git a/source/core/slang-md5.h b/source/core/slang-md5.h index 8c51a03ec..2e99fb667 100644 --- a/source/core/slang-md5.h +++ b/source/core/slang-md5.h @@ -70,6 +70,8 @@ namespace Slang void update(MD5Context* ctx, String str); // Helper update function for Checksums void update(MD5Context* ctx, const slang::Digest& checksum); + // Helper update function for ISlangBlob + void update(MD5Context* ctx, ISlangBlob* blob); void finalize(MD5Context* ctx, slang::Digest* result); |
