From 4f2330d059ab5943ddf33bfed37be6a0378d43a8 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Wed, 8 May 2024 09:13:45 -0700 Subject: capture/replay: interface implementation 1 (#4122) * capture/replay: interface implementation 1 - Add global session, filesystem, and session capture interface classes: GlobalSessionCapture for IGlobalSession FileSystemCapture for ISlangFileSystemExt SessionCapture for ISession - Add environment variables to enable it The 2 variables are SLANG_CAPTURE_LAYER and SLANG_CAPTURE_LOG_LEVEL SLANG_CAPTURE_LAYER: In slang_createGlobalSession(), after the compiling/loading stdlib, we will check the capture environment variable, if it's set to 1, we will create a GlobalSessionCapture object and return to user code. SLANG_CAPTURE_LOG_LEVEL: This is to set the log level, user can choose the loglevel to debug. (We can remove this when the feature is fully implemented). - Update premake file and cmake file to add the capture/replay source folder * Fix Windows build error Fix windows build error by adding the "SLANG_MCALL" keyword. Change to use Slang::ComPtr for those captured object pointers to simplify the resource management. Use __func__ macro to print the function name in the log. --- build/visual-studio/slang/slang.vcxproj | 10 +++++++-- build/visual-studio/slang/slang.vcxproj.filters | 30 ++++++++++++++++++++----- 2 files changed, 32 insertions(+), 8 deletions(-) (limited to 'build/visual-studio') diff --git a/build/visual-studio/slang/slang.vcxproj b/build/visual-studio/slang/slang.vcxproj index ee281252d..1c4761507 100644 --- a/build/visual-studio/slang/slang.vcxproj +++ b/build/visual-studio/slang/slang.vcxproj @@ -308,6 +308,10 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-aarch64\release\slang-glsla + + + + @@ -348,8 +352,6 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-aarch64\release\slang-glsla - - @@ -539,6 +541,10 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-aarch64\release\slang-glsla + + + + diff --git a/build/visual-studio/slang/slang.vcxproj.filters b/build/visual-studio/slang/slang.vcxproj.filters index f87a64ab1..b6789b77e 100644 --- a/build/visual-studio/slang/slang.vcxproj.filters +++ b/build/visual-studio/slang/slang.vcxproj.filters @@ -12,6 +12,18 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + Header Files @@ -132,12 +144,6 @@ Header Files - - Header Files - - - Header Files - Header Files @@ -701,6 +707,18 @@ Header Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + Source Files -- cgit v1.2.3