summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-06-18 14:17:57 -0400
committerGitHub <noreply@github.com>2020-06-18 11:17:57 -0700
commitdfbe3cfcdb308cdb0f89cb2844fb3aba96cfcaec (patch)
tree749a65af64f615de3d1f86a93b3e9c08a15c39b7 /source/slang/slang-options.cpp
parent5a86cd4880f8f086631352cb5d67d60c58c087f4 (diff)
Fix and improvements around repro (#1397)
* * Fix output in slang repro command line * Profile uses lowerCamel method names (had mix of upper and lower) * Rename slang-serialize-state/SerializeStateUtil to slang-repro and ReproUtil.
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 5bf0c6c9d..f3c702c26 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -12,7 +12,7 @@
#include "slang-file-system.h"
-#include "slang-state-serialize.h"
+#include "slang-repro.h"
#include "slang-ir-serialize.h"
#include "../core/slang-type-text-util.h"
@@ -483,7 +483,7 @@ struct OptionsParser
String reproName;
SLANG_RETURN_ON_FAIL(tryReadCommandLineArgument(sink, arg, &argCursor, argEnd, reproName));
- SLANG_RETURN_ON_FAIL(StateSerializeUtil::extractFilesToDirectory(reproName));
+ SLANG_RETURN_ON_FAIL(ReproUtil::extractFilesToDirectory(reproName));
}
else if (argStr == "-module-name")
{
@@ -498,16 +498,16 @@ struct OptionsParser
SLANG_RETURN_ON_FAIL(tryReadCommandLineArgument(sink, arg, &argCursor, argEnd, reproName));
List<uint8_t> buffer;
- SLANG_RETURN_ON_FAIL(StateSerializeUtil::loadState(reproName, buffer));
+ SLANG_RETURN_ON_FAIL(ReproUtil::loadState(reproName, buffer));
- auto requestState = StateSerializeUtil::getRequest(buffer);
+ auto requestState = ReproUtil::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;
String dirPath;
- if (SLANG_SUCCEEDED(StateSerializeUtil::calcDirectoryPathFromFilename(reproName, dirPath)))
+ if (SLANG_SUCCEEDED(ReproUtil::calcDirectoryPathFromFilename(reproName, dirPath)))
{
SlangPathType pathType;
if (SLANG_SUCCEEDED(Path::getPathType(dirPath, &pathType)) && pathType == SLANG_PATH_TYPE_DIRECTORY)
@@ -516,7 +516,7 @@ struct OptionsParser
}
}
- SLANG_RETURN_ON_FAIL(StateSerializeUtil::load(base, requestState, fileSystem, requestImpl));
+ SLANG_RETURN_ON_FAIL(ReproUtil::load(base, requestState, fileSystem, requestImpl));
hasLoadedRepro = true;
}
@@ -526,16 +526,16 @@ struct OptionsParser
SLANG_RETURN_ON_FAIL(tryReadCommandLineArgument(sink, arg, &argCursor, argEnd, reproName));
List<uint8_t> buffer;
- SLANG_RETURN_ON_FAIL(StateSerializeUtil::loadState(reproName, buffer));
+ SLANG_RETURN_ON_FAIL(ReproUtil::loadState(reproName, buffer));
- auto requestState = StateSerializeUtil::getRequest(buffer);
+ auto requestState = ReproUtil::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> dirFileSystem;
String dirPath;
- if (SLANG_SUCCEEDED(StateSerializeUtil::calcDirectoryPathFromFilename(reproName, dirPath)))
+ if (SLANG_SUCCEEDED(ReproUtil::calcDirectoryPathFromFilename(reproName, dirPath)))
{
SlangPathType pathType;
if (SLANG_SUCCEEDED(Path::getPathType(dirPath, &pathType)) && pathType == SLANG_PATH_TYPE_DIRECTORY)
@@ -545,7 +545,7 @@ struct OptionsParser
}
RefPtr<CacheFileSystem> cacheFileSystem;
- SLANG_RETURN_ON_FAIL(StateSerializeUtil::loadFileSystem(base, requestState, dirFileSystem, cacheFileSystem));
+ SLANG_RETURN_ON_FAIL(ReproUtil::loadFileSystem(base, requestState, dirFileSystem, cacheFileSystem));
// I might want to make the dir file system the fallback file system...
cacheFileSystem->setInnerFileSystem(dirFileSystem, cacheFileSystem->getUniqueIdentityMode(), cacheFileSystem->getPathStyle());
@@ -624,11 +624,11 @@ struct OptionsParser
{
auto profile = Profile(profileID);
- setProfileVersion(getCurrentTarget(), profile.GetVersion());
+ setProfileVersion(getCurrentTarget(), profile.getVersion());
// A `-profile` option that also specifies a stage (e.g., `-profile vs_5_0`)
// should be treated like a composite (e.g., `-profile sm_5_0 -stage vertex`)
- auto stage = profile.GetStage();
+ auto stage = profile.getStage();
if(stage != Stage::Unknown)
{
setStage(getCurrentEntryPoint(), stage);