summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-05-28 17:15:12 -0400
committerGitHub <noreply@github.com>2021-05-28 14:15:12 -0700
commit67486ee516ddc33806003727682cbfc68ab1f726 (patch)
tree21e44c4a01cae2bfa03de9ed35efe45f0ce1ac66 /source/slang/slang-compiler.h
parent89faa8a7d9b441b5dd92eec5fcf362eb3f38fa2b (diff)
Glslang refactor bugfix (#1863)
* #include an absolute path didn't work - because paths were taken to always be relative. * Fix issue with with SLANG_ENABLE_GLSLANG_SUPPORT * Update expected output from glslang-error.glsl * Fix bug in glsl dissassembly. * Make ExtensionTracker available even if source is not emitted. * Only explicitly set extension tracker based on capability bits, if we are in pass through. * Small simplification of invoke sourceEmit.
Diffstat (limited to 'source/slang/slang-compiler.h')
-rwxr-xr-xsource/slang/slang-compiler.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h
index e3d8e506c..8aaf1bb0b 100755
--- a/source/slang/slang-compiler.h
+++ b/source/slang/slang-compiler.h
@@ -2145,17 +2145,9 @@ namespace Slang
String calcSourcePathForEntryPoint(EndToEndCompileRequest* endToEndReq, Int entryPointIndex);
String calcSourcePathForEntryPoints(EndToEndCompileRequest* endToEndReq, const List<Int>& entryPointIndices);
- struct SourceResult
+ class ExtensionTracker : public RefObject
{
- void reset()
- {
- source = String();
- extensionTracker.setNull();
- }
-
- String source;
- // Must be cast to a specific extension tracker such as GLSLExtensionTracker
- RefPtr<RefObject> extensionTracker;
+ public:
};
/* Emits entry point source taking into account if a pass-through or not. Uses 'target' to determine
@@ -2166,7 +2158,8 @@ namespace Slang
TargetRequest* targetReq,
CodeGenTarget target,
EndToEndCompileRequest* endToEndReq,
- SourceResult& outSource);
+ ExtensionTracker* extensionTracker,
+ String& outSource);
SlangResult emitEntryPointSource(
BackEndCompileRequest* compileRequest,
@@ -2174,7 +2167,8 @@ namespace Slang
TargetRequest* targetReq,
CodeGenTarget target,
EndToEndCompileRequest* endToEndReq,
- SourceResult& outSource);
+ ExtensionTracker* extensionTracker,
+ String& outSource);
//