summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-downstream-compiler.h
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-07-17 17:00:05 -0700
committerGitHub <noreply@github.com>2024-07-17 17:00:05 -0700
commit32b1e25e359f8daf5254301dca8be308e8e1e2ab (patch)
tree2dd2bf7324b771c4a0aa989194a9b1d3b219af18 /source/compiler-core/slang-downstream-compiler.h
parent2db15080085856ed9b5f20642dbb354aac59a888 (diff)
Use slang-glslang.dll for spirv-validation (#4642)
* Use slang-glslang.dll for spirv-validation This change replaces the use of "spirv-val.exe" with an API call to "spvtools::SpirvTools::Validate()". Closes #4610
Diffstat (limited to 'source/compiler-core/slang-downstream-compiler.h')
-rw-r--r--source/compiler-core/slang-downstream-compiler.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/compiler-core/slang-downstream-compiler.h b/source/compiler-core/slang-downstream-compiler.h
index 14e924f8b..95793eaa3 100644
--- a/source/compiler-core/slang-downstream-compiler.h
+++ b/source/compiler-core/slang-downstream-compiler.h
@@ -309,6 +309,8 @@ public:
virtual SLANG_NO_THROW SlangResult SLANG_MCALL convert(IArtifact* from, const ArtifactDesc& to, IArtifact** outArtifact) = 0;
/// Get the version of this compiler
virtual SLANG_NO_THROW SlangResult SLANG_MCALL getVersionString(slang::IBlob** outVersionString) = 0;
+ /// Validate and return the result
+ virtual SLANG_NO_THROW SlangResult SLANG_MCALL validate(const uint32_t* contents, int contentsSize) = 0;
/// True if underlying compiler uses file system to communicate source
virtual SLANG_NO_THROW bool SLANG_MCALL isFileBased() = 0;
@@ -327,6 +329,7 @@ public:
virtual SLANG_NO_THROW bool SLANG_MCALL canConvert(const ArtifactDesc& from, const ArtifactDesc& to) SLANG_OVERRIDE { SLANG_UNUSED(from); SLANG_UNUSED(to); return false; }
virtual SLANG_NO_THROW SlangResult SLANG_MCALL convert(IArtifact* from, const ArtifactDesc& to, IArtifact** outArtifact) SLANG_OVERRIDE;
virtual SLANG_NO_THROW SlangResult SLANG_MCALL getVersionString(slang::IBlob** outVersionString) SLANG_OVERRIDE { *outVersionString = nullptr; return SLANG_FAIL; }
+ virtual SLANG_NO_THROW SlangResult SLANG_MCALL validate(const uint32_t* contents, int contentsSize) SLANG_OVERRIDE { SLANG_UNUSED(contents); SLANG_UNUSED(contentsSize); return SLANG_FAIL; }
DownstreamCompilerBase(const Desc& desc):
m_desc(desc)