summaryrefslogtreecommitdiff
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-10-24 17:58:24 -0400
committerTim Foley <tfoleyNV@users.noreply.github.com>2019-10-24 14:58:24 -0700
commit89ddb50eaccc1b7b590dbde55032721762711fb2 (patch)
treee61da2c1604e0d52d3a9915363769ccf950b62f3 /source/slang/slang-options.cpp
parent58ad4b1a9ca43098a071c42bd752a4a48405bf0e (diff)
OffsetContainer serialization (#1093)
* OffsetContainer with unit tests. * State serialization working with OffsetContainer. * Fixes to make work with OffsetContainer. * Added OffsetContainer documentation. * Remove RelativeContainer. * Fix problem with + on Offset32Ptr on windows x86 target. * * Made OffsetBase a base class of OffsetContainer. * Added MemoryOffsetBase to just handle being a chunk of memory. * * Use operator[] to access contents of OffsetContainer * Fix the type hash to work across different size_t sizes. * Fixed some Offset type related comments. * Fix bug around using asBase, because it returns a reference just using 'auto' will means it becomes a value type. Remove assignment and copy ctor from OffsetBase. * Evaluation order of assignment can lead to wrong behavior with Offset32Ptr/raw pointers. Document the fact, and fix in StateSerializeUtil.
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 3e2bec07d..c76993ca4 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -514,6 +514,8 @@ struct OptionsParser
SLANG_RETURN_ON_FAIL(StateSerializeUtil::loadState(reproName, buffer));
auto requestState = StateSerializeUtil::getRequest(buffer);
+ MemoryOffsetBase base;
+ base.set(buffer.getBuffer(), buffer.getCount());
// If we can find a directory, that exists, we will set up a file system to load from that directory
ComPtr<ISlangFileSystem> fileSystem;
@@ -527,7 +529,7 @@ struct OptionsParser
}
}
- SLANG_RETURN_ON_FAIL(StateSerializeUtil::load(requestState, fileSystem, requestImpl));
+ SLANG_RETURN_ON_FAIL(StateSerializeUtil::load(base, requestState, fileSystem, requestImpl));
if (argCursor < argEnd)
{