diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-09-17 12:25:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-17 12:25:45 -0400 |
| commit | 3af404da7f7f125464b78159940cb3fc06e69cc5 (patch) | |
| tree | d1640fc1ac08be8a15420a8603eba991833a1792 /tools/render-test/options.cpp | |
| parent | 3758a50dae81973b00541f2a151e3ee9cd2d1645 (diff) | |
CPU ABI improvements (#1056)
* WIP: Improving CPU performance/ABI
* Optionally output code on CPU for groupThreadID and groupID.
* Added ability to set compute dispatch size on command line for render-test.
Dispatch compute tests taking into account dispatch size.
Added test for semantics are working.
* Test using GroupRange.
* Fix problem with adding \n for externa diagnostic - to do it if there isn't a \n at the end. Change the ouput order (put result before) so last value is diagnostic string.
Diffstat (limited to 'tools/render-test/options.cpp')
| -rw-r--r-- | tools/render-test/options.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/render-test/options.cpp b/tools/render-test/options.cpp index 1cf0ffbe8..d2f21a5d9 100644 --- a/tools/render-test/options.cpp +++ b/tools/render-test/options.cpp @@ -179,6 +179,34 @@ SlangResult parseOptions(int argc, const char*const* argv, Slang::WriterHelper s gOptions.adapter = *argCursor++; } + else if (strcmp(arg, "-compute-dispatch") == 0) + { + if (argCursor == argEnd) + { + stdError.print("error: comma separated compute dispatch size for '%s'\n", arg); + return SLANG_FAIL; + } + List<UnownedStringSlice> slices; + StringUtil::split(UnownedStringSlice(*argCursor++), ',', slices); + if (slices.getCount() != 3) + { + stdError.print("error: expected 3 comma separated integers for compute dispatch size for '%s'\n", arg); + return SLANG_FAIL; + } + + String string; + for (Index i = 0; i < 3; ++i) + { + string = slices[i]; + int v = StringToInt(string); + if (v < 1) + { + stdError.print("error: expected 3 comma positive integers for compute dispatch size for '%s'\n", arg); + return SLANG_FAIL; + } + gOptions.computeDispatchSize[i] = v; + } + } else { // Lookup |
