<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang-capture-replay/capture_utility.cpp, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2024-07-23T15:45:26+00:00</updated>
<entry>
<title>Feature/capture (#4625)</title>
<updated>2024-07-23T15:45:26+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-07-23T15:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=986256ffb92ab7c8fc7cf9f2c424919a439a824f'/>
<id>urn:sha1:986256ffb92ab7c8fc7cf9f2c424919a439a824f</id>
<content type='text'>
* Add decoder

* Add a replay executable to consume the decoded content

Add file-processor.cpp/h where we implement the logic to process
the captured file block by block. Each block is:
function header + parameter buffer + function tailer + function
output[optional].

After reading one block, the block of data is sent to decoder module
to dispatch the corresponding API.

Add slang-decoder.cpp/h where we implement the logic to dispatch
the slang API according to the input block data.

- Rename api_callId.h to capture-format.h
- Renmae capture_utility.cpp to capture-utility.cpp
- Renmae capture_utility.h to capture-utility.h
- Change the #include file name accordingly.

* Reorganize source files structure

Move all the capture logic code into `capture` directory.
 - the capture code will be build with slang dll.

Move all the replay logic code into `relay` directoy.
 - the replay code is not part of slang dll, it will be built
   as a stand alone binary and link against slang dll.

Change the #include file names accordingly.

Add tools/slang-replay/main.cpp for the slang-replay stand alone
binary place holder. Will implement it later.

Update premake5.lua accordingly.

* Update cmake files

Update cmake files to change the build process for
capture and relay system.

 - capture component should be build with slang dll, so we
   should not include replay component.
 - replay component should be a separate executable tool, which
   should not include capture component.
 - In order to easy use our current cmake infrastructure, move
   the shared files to a `util` folder
 - change the header include path

* Redesgin the interfaces of consumers

Fix some issues in capture
Finish implementing all slang-decoder functions

* Fix the AppleClang build issue

* Address few comments

- Fix the weird indent issues.
- Correct the function name for CreateGlobalSession()
- Rename file-processor to captureFile-processor to be more specific.
- Use Slang::List instead of std::vector

* record/replay: name refactor change

Refactor the naming.

Change the name "encoder/capture" to "record".</content>
</entry>
<entry>
<title>capture/replay: interface implementation 1 (#4122)</title>
<updated>2024-05-08T16:13:45+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-05-08T16:13:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4f2330d059ab5943ddf33bfed37be6a0378d43a8'/>
<id>urn:sha1:4f2330d059ab5943ddf33bfed37be6a0378d43a8</id>
<content type='text'>
* 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.</content>
</entry>
</feed>
