diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-09-09 13:54:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-09 13:54:31 -0400 |
| commit | 047daae9300c8a94d28383cf992ce00e3ad2da1e (patch) | |
| tree | 520025463f6493b31d859a812af8a1384a23f715 /tools/render-test/slang-support.h | |
| parent | 4fc07614d6407e49a0c34e7483d410153c0b269a (diff) | |
CPU compute testing on non windows targets (#1045)
* WIP: Refactor of CPUCompute and stand alone cpu-render-test
* Fix compilation on CygWin.
* Make CPU compute tests run on non windows targets.
* Check that C/C++ compiler is available for CPU compute.
* Fix some tabbing issues.
* Add -fPIC on gfx
* Use dxcompiler_47.dll from slang-binaries on windows.
* make https for git module slang-binaries
* Fix comment in premake5.lua around d3dcompiler_47.dll
* Add resources to the CPUComputeUtil::Context to keep in scope.
* Fixes problem compiling on cygwin where dx12 is included in build of gfx lib.
Diffstat (limited to 'tools/render-test/slang-support.h')
| -rw-r--r-- | tools/render-test/slang-support.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/render-test/slang-support.h b/tools/render-test/slang-support.h index 662098546..543ab3258 100644 --- a/tools/render-test/slang-support.h +++ b/tools/render-test/slang-support.h @@ -6,6 +6,7 @@ #include <slang.h> #include "shader-input-layout.h" +#include "options.h" namespace renderer_test { @@ -33,6 +34,12 @@ struct ShaderCompilerUtil } void reset() { + { + desc.pipelineType = PipelineType::Unknown; + desc.kernels = nullptr; + desc.kernelCount = 0; + } + kernelDescs.clear(); if (request && session) { @@ -52,8 +59,20 @@ struct ShaderCompilerUtil ShaderProgram::Desc desc; SlangCompileRequest* request = nullptr; SlangSession* session = nullptr; + }; + struct OutputAndLayout + { + Output output; + ShaderInputLayout layout; + Slang::String sourcePath; + }; + + static SlangResult compileWithLayout(SlangSession* session, const Slang::String& sourcePath, Options::ShaderProgramType shaderType, const ShaderCompilerUtil::Input& input, OutputAndLayout& output); + + static SlangResult readSource(const Slang::String& inSourcePath, List<char>& outSourceText); + static SlangResult compileProgram(SlangSession* session, const Input& input, const ShaderCompileRequest& request, Output& out); }; |
