diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-09-16 11:06:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-16 11:06:03 -0400 |
| commit | 3758a50dae81973b00541f2a151e3ee9cd2d1645 (patch) | |
| tree | c41bc4ab616fd38ab3f095b9c09eb6621a4311b1 | |
| parent | 40d8f3aeedf018c7c6766e98ec64733abd90671e (diff) | |
Remove remaining unused cpu-render-test files/references. (#1054)
| -rw-r--r-- | premake5.lua | 2 | ||||
| -rw-r--r-- | tools/render-test/cpu-render-test-main.cpp | 99 |
2 files changed, 0 insertions, 101 deletions
diff --git a/premake5.lua b/premake5.lua index a1e729113..ef6737a7c 100644 --- a/premake5.lua +++ b/premake5.lua @@ -507,8 +507,6 @@ toolSharedLibrary "render-test" includedirs { ".", "external", "source", "tools/gfx" } links { "core", "slang", "gfx" } - removefiles { "tools/render-test/cpu-render-test-main.cpp" } - if isTargetWindows then addSourceDir "tools/render-test/windows" diff --git a/tools/render-test/cpu-render-test-main.cpp b/tools/render-test/cpu-render-test-main.cpp deleted file mode 100644 index d754f9359..000000000 --- a/tools/render-test/cpu-render-test-main.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// cpu-render-test-main.cpp - -#include "options.h" - -#include "slang-support.h" - -#include "../source/core/slang-io.h" - -#include "shader-input-layout.h" -#include <stdio.h> -#include <stdlib.h> - -#include "../../source/core/slang-test-tool-util.h" - -#include "cpu-compute-util.h" - -SLANG_TEST_TOOL_API SlangResult innerMain(Slang::StdWriters* stdWriters, SlangSession* session, int argcIn, const char*const* argvIn) -{ - using namespace renderer_test; - using namespace Slang; - - StdWriters::setSingleton(stdWriters); - - // Parse command-line options - SLANG_RETURN_ON_FAIL(parseOptions(argcIn, argvIn, StdWriters::getError())); - - // Declare window pointer before renderer, such that window is released after renderer - RefPtr<renderer_test::Window> window; - // Renderer is constructed (later) using the window - Slang::RefPtr<Renderer> renderer; - - ShaderCompilerUtil::Input input; - - input.profile = ""; - input.target = SLANG_TARGET_NONE; - input.args = &gOptions.slangArgs[0]; - input.argCount = gOptions.slangArgCount; - - SlangSourceLanguage nativeLanguage = SLANG_SOURCE_LANGUAGE_UNKNOWN; - SlangPassThrough slangPassThrough = SLANG_PASS_THROUGH_NONE; - char const* profileName = ""; - switch (gOptions.rendererType) - { - case RendererType::CPU: - input.target = SLANG_HOST_CALLABLE; - input.profile = ""; - nativeLanguage = SLANG_SOURCE_LANGUAGE_CPP; - slangPassThrough = SLANG_PASS_THROUGH_GENERIC_C_CPP; - break; - default: - fprintf(stderr, "error: unexpected\n"); - return SLANG_FAIL; - } - - switch (gOptions.inputLanguageID) - { - case Options::InputLanguageID::Slang: - input.sourceLanguage = SLANG_SOURCE_LANGUAGE_SLANG; - input.passThrough = SLANG_PASS_THROUGH_NONE; - break; - - case Options::InputLanguageID::Native: - input.sourceLanguage = nativeLanguage; - input.passThrough = slangPassThrough; - break; - - default: - break; - } - - // Use the profile name set on options if set - input.profile = gOptions.profileName ? gOptions.profileName : input.profile; - - { - ShaderCompilerUtil::OutputAndLayout compilationAndLayout; - SLANG_RETURN_ON_FAIL(ShaderCompilerUtil::compileWithLayout(session, gOptions.sourcePath, gOptions.shaderType, input, compilationAndLayout)); - - CPUComputeUtil::Context context; - SLANG_RETURN_ON_FAIL(CPUComputeUtil::calcBindings(compilationAndLayout, context)); - SLANG_RETURN_ON_FAIL(CPUComputeUtil::execute(compilationAndLayout, context)); - - // Dump everything out that was written - return CPUComputeUtil::writeBindings(compilationAndLayout.layout, context.buffers, gOptions.outputPath); - } -} - -int main(int argc, char** argv) -{ - using namespace Slang; - SlangSession* session = spCreateSession(nullptr); - - TestToolUtil::setSessionDefaultPrelude(argv[0], session); - auto stdWriters = StdWriters::initDefaultSingleton(); - SlangResult res = innerMain(stdWriters, session, argc, argv); - spDestroySession(session); - - return (int)TestToolUtil::getReturnCode(res); -} - |
