summaryrefslogtreecommitdiffstats
path: root/tools/gfx/d3d12
diff options
context:
space:
mode:
authorcheneym2 <acheney@nvidia.com>2025-02-26 21:20:29 -0500
committerGitHub <noreply@github.com>2025-02-26 18:20:29 -0800
commit02706dfc5f0526f4f8ca337be16d7b00640ba168 (patch)
tree08a7b1a94aaa048a07864bf7dec68ab23fb00edb /tools/gfx/d3d12
parent6e862bb370c1f64abf0e7f9efa73dec38a76555e (diff)
Fix precompiledTargetModule tests (#6455)
* Fix precompiledTargetModule tests Add SPIRV-Tool linker support to gfx unit tests and use the linker in precompileModule tests that use precompiled modules to reconstitute SPIRV shaders that were modularly compiled. Fix a Slang reference count bug in the precompile service. * Use sm_6_6 New DXC requires higher version for linkability. * Rename helper function, pass by reference * Link through slang-glslang * Add missing files * Fix metal * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/gfx/d3d12')
-rw-r--r--tools/gfx/d3d12/d3d12-shader-program.cpp6
-rw-r--r--tools/gfx/d3d12/d3d12-shader-program.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/gfx/d3d12/d3d12-shader-program.cpp b/tools/gfx/d3d12/d3d12-shader-program.cpp
index a39f20465..e52fa320e 100644
--- a/tools/gfx/d3d12/d3d12-shader-program.cpp
+++ b/tools/gfx/d3d12/d3d12-shader-program.cpp
@@ -10,14 +10,14 @@ using namespace Slang;
Result ShaderProgramImpl::createShaderModule(
slang::EntryPointReflection* entryPointInfo,
- ComPtr<ISlangBlob> kernelCode)
+ List<ComPtr<ISlangBlob>>& kernelCodes)
{
ShaderBinary shaderBin;
shaderBin.stage = entryPointInfo->getStage();
shaderBin.entryPointInfo = entryPointInfo;
shaderBin.code.addRange(
- reinterpret_cast<const uint8_t*>(kernelCode->getBufferPointer()),
- (Index)kernelCode->getBufferSize());
+ reinterpret_cast<const uint8_t*>(kernelCodes[0]->getBufferPointer()),
+ (Index)kernelCodes[0]->getBufferSize());
m_shaders.add(_Move(shaderBin));
return SLANG_OK;
}
diff --git a/tools/gfx/d3d12/d3d12-shader-program.h b/tools/gfx/d3d12/d3d12-shader-program.h
index 669bce960..b95eb030c 100644
--- a/tools/gfx/d3d12/d3d12-shader-program.h
+++ b/tools/gfx/d3d12/d3d12-shader-program.h
@@ -27,7 +27,7 @@ public:
virtual Result createShaderModule(
slang::EntryPointReflection* entryPointInfo,
- ComPtr<ISlangBlob> kernelCode) override;
+ List<ComPtr<ISlangBlob>>& kernelCodes) override;
};
} // namespace d3d12