diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-09-13 15:59:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-13 15:59:15 -0400 |
| commit | c2e5d2468ad6a38cdb8a067da0678302f6cc6066 (patch) | |
| tree | 97c448d28e54068d84c422e9f172996b7a95f1ed /tools/slang-test | |
| parent | 0b6321b3f08c48e37e6b8256d420f05d9727fb5a (diff) | |
Refactor render-test to make cross platform (#1053)
* First pass of render-test refactor.
* Make window construction a function that can choose an implementation.
* Remove OpenGL as currently has windows dependency.
* Disable Vulkan as Renderer impl has dependency on windows.
* Pass Window in as parameter of 'update'.
* Add win-window.cpp as was missing.
* Fix warning on windows about signs during comparison.
Diffstat (limited to 'tools/slang-test')
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index 42b9e9331..26d611181 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -751,26 +751,11 @@ static SlangResult _extractReflectionTestRequirements(const CommandLine& cmdLine return SLANG_OK; } -static SlangResult _tryUseCPURenderTest(TestContext* context, CommandLine& ioCmdLine) -{ - String exeName = Path::getFileNameWithoutExt(ioCmdLine.m_executable); - - if (exeName == "render-test") - { - bool useCPU = ioCmdLine.findArgIndex(UnownedStringSlice::fromLiteral("-cpu")) >= 0; - if (useCPU) - { - ioCmdLine.setExecutablePath(Path::combine(context->options.binDir, String("cpu-render-test") + ProcessUtil::getExecutableSuffix())); - } - } - return SLANG_OK; -} - static SlangResult _extractTestRequirements(const CommandLine& cmdLine, TestRequirements* ioInfo) { String exeName = Path::getFileNameWithoutExt(cmdLine.m_executable); - if (exeName == "render-test" || exeName == "cpu-render-test") + if (exeName == "render-test") { return _extractRenderTestRequirements(cmdLine, ioInfo); } @@ -830,8 +815,6 @@ static RenderApiFlags _getAvailableRenderApiFlags(TestContext* context) builder << "-" << RenderApiUtil::getApiName(apiType); cmdLine.addArg(builder); - _tryUseCPURenderTest(context, cmdLine); - // Run the render-test tool and see if the device could startup ExecuteResult exeRes; if (SLANG_SUCCEEDED(spawnAndWaitSharedLibrary(context, "device-startup", cmdLine, exeRes)) @@ -2071,8 +2054,6 @@ TestResult runComputeComparisonImpl(TestContext* context, TestInput& input, cons auto actualOutputFile = outputStem + ".actual.txt"; cmdLine.addArg(actualOutputFile); - _tryUseCPURenderTest(context, cmdLine); - if (context->isExecuting()) { // clear the stale actual output file first. This will allow us to detect error if render-test fails and outputs nothing. @@ -2188,8 +2169,6 @@ TestResult doRenderComparisonTestRun(TestContext* context, TestInput& input, cha cmdLine.addArg("-o"); cmdLine.addArg(outputStem + outputKind + ".png"); - _tryUseCPURenderTest(context, cmdLine); - ExecuteResult exeRes; TEST_RETURN_ON_DONE(spawnAndWait(context, outputStem, input.spawnType, cmdLine, exeRes)); |
