summaryrefslogtreecommitdiffstats
path: root/tools/render-test/options.cpp
diff options
context:
space:
mode:
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);