summaryrefslogtreecommitdiffstats
path: root/slang.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-10-23 09:28:58 -0400
committerGitHub <noreply@github.com>2019-10-23 09:28:58 -0400
commit9c2d1766ea33101b551ac521ddc39516b98b6641 (patch)
treefeee466c977575ebcb15b9057a59c2efce5d9ae1 /slang.h
parent6a7f4c9cef766e538a808a8f03411af2f10106e1 (diff)
Expose more repro in API, support output params. (#1087)
* Added spEnableReproCapture to the API. * Added MemoryStreamBase - which can be used to read from without copyin the data. Added the missing Repro API functions - spEnableReproCapture and spExtractRepro. Added support for serializing output filenames. * Improved naming around Stream. Brought Stream and sub types closer to code conventions. * Renamed content -> contents in Stream.
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/slang.h b/slang.h
index a7e4b8aa7..3766dd457 100644
--- a/slang.h
+++ b/slang.h
@@ -1647,6 +1647,36 @@ extern "C"
ISlangBlob** outBlob
);
+ /** Enable repro capture.
+
+ Should be set after any ISlangFileSystem has been set, but before any compilation. It ensures that everything
+ that the ISlangFileSystem accesses will be correctly recorded.
+ Note that if a ISlangFileSystem/ISlangFileSystemExt isn't explicitly set (ie the default is used), then the
+ request will automatically be set up to record everything appropriate.
+
+ @param request The request
+ @returns A `SlangResult` to indicate success or failure.
+ */
+ SLANG_API SlangResult spEnableReproCapture(
+ SlangCompileRequest* request);
+
+ /** Extract contents of a repro.
+
+ Writes the contained files and manifest with their 'unique' names into fileSystem. For more details read the
+ docs/repro.md documentation.
+
+ @param session The slang session
+ @param reproData Holds the repro data
+ @param reproDataSize The size of the repro data
+ @param fileSystem File system that the contents of the repro will be written to
+ @returns A `SlangResult` to indicate success or failure.
+ */
+ SLANG_API SlangResult spExtractRepro(
+ SlangSession* session,
+ const void* reproData,
+ size_t reproDataSize,
+ ISlangFileSystemExt* fileSystem);
+
/*
Forward declarations of types used in the reflection interface;
*/