summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-03-05 10:59:54 -0500
committerGitHub <noreply@github.com>2020-03-05 10:59:54 -0500
commit6684d32db1f5693bcfb4971558cb30e855cd3bad (patch)
tree480e014b917a6eb0fe72faa6c52a25f4856ed1cb /source/slang/slang-compiler.h
parent5951d2a45f3546a619fb5b032a4a422229c46e4c (diff)
Feature/glslang spirv version (#1256)
* WIP add support for __spirv_version . * Added IRRequireSPIRVVersionDecoration * SPIR-V version passed to glslang. Enable VK wave tests. Split ExtensionTracker out, so can be cast and used externally to emit. Added SourceResult. * Fix warning on Clang. * Missing hlsl.meta.h * Refactor communication/parsing of __spirv_version with glslang. * Fix some debug typos. Be more precise in handling of substring handling. * Make glslang forwards and backwards binary compatible. * Small comment improvements. * Added slang-spirv-target-info.h/cpp * Fix for major/minor on gcc. * Another fix for gcc/clang. * VS projects include slang-spirv-target-info.h/cpp * Removed SPIRVTargetInfo Added SemanticVersion. Don't bother with passing a target to glslang. Should be separate from 'version'. * Renamed slang-emit-glsl-extension-tracker.cpp/.h -> slang-glsl-extension-tracker.cpp/.h Fixed some VS project issues. * Fix a comment. * Added slang-semantic-version.cpp/.h * Added slang-glsl-extension-tracker.cpp/.h * Added split that can check for input has all been parsed. * Fix problem on x86 win build.
Diffstat (limited to 'source/slang/slang-compiler.h')
-rw-r--r--source/slang/slang-compiler.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h
index e337c2fff..7cfc4fac1 100644
--- a/source/slang/slang-compiler.h
+++ b/source/slang/slang-compiler.h
@@ -1902,19 +1902,33 @@ namespace Slang
If the end-to-end compile is a pass-through case, will attempt to find the (unique) source file
pathname for the translation unit containing the entry point at `entryPointIndex.
If the compilation is not in a pass-through case, then always returns `"slang-generated"`.
- @param endToEndReq The end-to-end compile request which might be using pass-through copmilation
+ @param endToEndReq The end-to-end compile request which might be using pass-through compilation
@param entryPointIndex The index of the entry point to compute a filename for.
@return the appropriate source filename */
String calcSourcePathForEntryPoint(EndToEndCompileRequest* endToEndReq, UInt entryPointIndex);
+ struct SourceResult
+ {
+ void reset()
+ {
+ source = String();
+ extensionTracker.setNull();
+ }
+
+ String source;
+ // Must be cast to a specific extension tracker such as GLSLExtensionTracker
+ RefPtr<RefObject> extensionTracker;
+ };
+
/* Emits entry point source taking into account if a pass-through or not. Uses 'target' to determine
the target (not targetReq) */
- String emitEntryPointSource(
+ SlangResult emitEntryPointSource(
BackEndCompileRequest* compileRequest,
Int entryPointIndex,
TargetRequest* targetReq,
CodeGenTarget target,
- EndToEndCompileRequest* endToEndReq);
+ EndToEndCompileRequest* endToEndReq,
+ SourceResult& outSource);
struct TypeCheckingCache;
//
@@ -1986,7 +2000,8 @@ namespace Slang
enum class SharedLibraryFuncType
{
- Glslang_Compile,
+ Glslang_Compile_1_0,
+ Glslang_Compile_1_1,
Fxc_D3DCompile,
Fxc_D3DDisassemble,
Dxc_DxcCreateInstance,