From d349fd9e1f65fd32b2f4ea0e38c5084256d0dd04 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Thu, 20 Jun 2024 20:59:33 -0700 Subject: Add capture logic to other interfaces. (#4412) * Add capture logic to other interfaces. Add capture logics to ISession, IModule, ITypeConformance, IEntryPoint ICompositeComponentType. Add few encode methods to encode the array. Fix some capture logic in global session. We will not need to encode the null_ptr output before actual actual of the captured APIs. Previously we used this as a place holder, but it's actually not necessary, it can be detected if the output is not captured during replay. * capture/replay: dump the shader files to disk Dump the shader files to disk. Also set a default directory for the capture files. --- source/slang-capture-replay/parameter-encoder.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'source/slang-capture-replay/parameter-encoder.cpp') diff --git a/source/slang-capture-replay/parameter-encoder.cpp b/source/slang-capture-replay/parameter-encoder.cpp index 8c77884a9..c73a97b08 100644 --- a/source/slang-capture-replay/parameter-encoder.cpp +++ b/source/slang-capture-replay/parameter-encoder.cpp @@ -73,6 +73,12 @@ namespace SlangCapture } } + void ParameterEncoder::encodeStruct(slang::SpecializationArg const& specializationArg) + { + encodeEnumValue(specializationArg.kind); + encodeAddress(specializationArg.type); + } + void ParameterEncoder::encodePointer(const void* value, bool omitData, size_t size) { encodeAddress(value); @@ -114,13 +120,4 @@ namespace SlangCapture m_stream->write(value, size); } } - - void ParameterEncoder::encodeStringArray(const char* const* strArray, size_t count) - { - encodeUint64(count); - for (size_t i = 0; i < count; i++) - { - encodeString(strArray[i]); - } - } } -- cgit v1.2.3