diff options
| author | Yong He <yonghe@outlook.com> | 2020-12-03 08:23:05 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-03 08:23:05 -0800 |
| commit | 44c0a56974b664e50b2cb8cb6f10740b19c4e02f (patch) | |
| tree | d6141003be376bdb2c0037178b649b6b2aae673e /tools/render-test/cpu-compute-util.cpp | |
| parent | ad5dda9261bae63e32bcb914b109fcb5c92faf25 (diff) | |
Add shader object parameter binding to renderer_test. (#1622)
* Add shader object parameter binding to renderer_test.
* remove multiple-definitions.hlsl
* Fix cuda implementation.
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'tools/render-test/cpu-compute-util.cpp')
| -rw-r--r-- | tools/render-test/cpu-compute-util.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/render-test/cpu-compute-util.cpp b/tools/render-test/cpu-compute-util.cpp index 72e44fb78..7c9103cb3 100644 --- a/tools/render-test/cpu-compute-util.cpp +++ b/tools/render-test/cpu-compute-util.cpp @@ -420,8 +420,9 @@ SlangResult CPUComputeUtil::fillRuntimeHandleInBuffers( Context& context, ISlangSharedLibrary* sharedLib) { + auto request = compilationAndLayout.output.getRequestForReflection(); Slang::ComPtr<slang::ISession> linkage; - spCompileRequest_getSession(compilationAndLayout.output.request, linkage.writeRef()); + spCompileRequest_getSession(request, linkage.writeRef()); auto& inputLayout = compilationAndLayout.layout; for (auto& entry : inputLayout.entries) { @@ -433,7 +434,7 @@ SlangResult CPUComputeUtil::fillRuntimeHandleInBuffers( case RTTIDataEntryType::RTTIObject: { auto reflection = - slang::ShaderReflection::get(compilationAndLayout.output.request); + slang::ShaderReflection::get(request); auto concreteType = reflection->findTypeByName(rtti.typeName.getBuffer()); ComPtr<ISlangBlob> outName; linkage->getTypeRTTIMangledName(concreteType, outName.writeRef()); @@ -444,7 +445,7 @@ SlangResult CPUComputeUtil::fillRuntimeHandleInBuffers( break; case RTTIDataEntryType::WitnessTable: { - auto reflection = slang::ShaderReflection::get(compilationAndLayout.output.request); + auto reflection = slang::ShaderReflection::get(request); auto concreteType = reflection->findTypeByName(rtti.typeName.getBuffer()); if (!concreteType) return SLANG_FAIL; @@ -503,7 +504,7 @@ SlangResult CPUComputeUtil::fillRuntimeHandleInBuffers( /* static */SlangResult CPUComputeUtil::calcBindings(const ShaderCompilerUtil::OutputAndLayout& compilationAndLayout, Context& outContext) { - auto request = compilationAndLayout.output.request; + auto request = compilationAndLayout.output.getRequestForReflection(); auto reflection = (slang::ShaderReflection*) spGetReflection(request); const auto& sourcePath = compilationAndLayout.sourcePath; @@ -684,7 +685,7 @@ SlangResult CPUComputeUtil::fillRuntimeHandleInBuffers( /* static */SlangResult CPUComputeUtil::calcExecuteInfo(ExecuteStyle style, ISlangSharedLibrary* sharedLib, const uint32_t dispatchSize[3], const ShaderCompilerUtil::OutputAndLayout& compilationAndLayout, Context& context, ExecuteInfo& out) { - auto request = compilationAndLayout.output.request; + auto request = compilationAndLayout.output.getRequestForReflection(); auto reflection = (slang::ShaderReflection*) spGetReflection(request); slang::EntryPointReflection* entryPoint = nullptr; |
