summaryrefslogtreecommitdiffstats
path: root/tools/render-test/options.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-06-19 10:23:16 -0700
committerGitHub <noreply@github.com>2017-06-19 10:23:16 -0700
commitbb9ca29160f5d95f3860504262693ea650d96be5 (patch)
tree04f502283ed818f661e368b3d8d1ba5ce875d1d2 /tools/render-test/options.cpp
parentcafed774d99f95bce6f182599913f3417dc68a3a (diff)
parent634522da69b14b38c15b14d6b717b1289812e9bb (diff)
Merge pull request #29 from tfoleyNV/auto-import
Allow for automatic importing of Slang code
Diffstat (limited to 'tools/render-test/options.cpp')
-rw-r--r--tools/render-test/options.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/render-test/options.cpp b/tools/render-test/options.cpp
index a486c8b15..53f88b7a9 100644
--- a/tools/render-test/options.cpp
+++ b/tools/render-test/options.cpp
@@ -76,6 +76,22 @@ void parseOptions(int* argc, char** argv)
{
gOptions.mode = Mode::GLSLCrossCompile;
}
+ else if( strcmp(arg, "-xslang") == 0 )
+ {
+ // This is an option that we want to pass along to Slang
+
+ if( argCursor == argEnd )
+ {
+ fprintf(stderr, "expected argument for '%s' option\n", arg);
+ exit(1);
+ }
+ if( gOptions.slangArgCount == kMaxSlangArgs )
+ {
+ fprintf(stderr, "maximum number of '%s' options exceeded (%d)\n", arg, kMaxSlangArgs);
+ exit(1);
+ }
+ gOptions.slangArgs[gOptions.slangArgCount++] = *argCursor++;
+ }
else
{
fprintf(stderr, "unknown option '%s'\n", arg);