summaryrefslogtreecommitdiff
path: root/tools/render-test/slang-support.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/render-test/slang-support.h')
-rw-r--r--tools/render-test/slang-support.h19
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);
};