From fab1c9f4c745ba84983c2448646376799d461e96 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 9 Oct 2020 11:29:11 -0700 Subject: Support CUDA bindless texture in dynamic dispatch code. (#1575) --- tools/render-test/cpu-compute-util.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tools/render-test/cpu-compute-util.h') diff --git a/tools/render-test/cpu-compute-util.h b/tools/render-test/cpu-compute-util.h index 01b781ca7..56d510818 100644 --- a/tools/render-test/cpu-compute-util.h +++ b/tools/render-test/cpu-compute-util.h @@ -6,7 +6,7 @@ #include "bind-location.h" -#include "../../source/core/slang-smart-pointer.h" +#include "../../source/core/slang-basic.h" namespace renderer_test { @@ -34,6 +34,9 @@ struct CPUComputeUtil /// Buffers are held in same order as entries in layout (useful for dumping out bindings) List m_buffers; + + /// Bindless resource objects + Slang::OrderedDictionary> m_bindlessResources; }; struct ExecuteInfo @@ -55,9 +58,12 @@ struct CPUComputeUtil /// Runs code across run styles and makes sure output buffers match static SlangResult checkStyleConsistency(ISlangSharedLibrary* sharedLib, const uint32_t dispatchSize[3], const ShaderCompilerUtil::OutputAndLayout& compilationAndLayout); - /// Query and fill in the RTTI pointer values in data buffers. - static SlangResult populateRTTIEntries( + static SlangResult createBindlessResources(ShaderCompilerUtil::OutputAndLayout& compilationAndLayout, Context& context); + + /// Query and fill in the RTTI pointer and runtime resource handle values in data buffers. + static SlangResult fillRuntimeHandleInBuffers( ShaderCompilerUtil::OutputAndLayout& compilationAndLayout, + Context& context, ISlangSharedLibrary* sharedLib); static SlangResult calcBindings(const ShaderCompilerUtil::OutputAndLayout& compilationAndLayout, Context& outContext); -- cgit v1.2.3