diff options
| author | Yong He <yonghe@outlook.com> | 2020-10-09 11:29:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-09 11:29:11 -0700 |
| commit | fab1c9f4c745ba84983c2448646376799d461e96 (patch) | |
| tree | 3176c03987417c01b7220aaf13c35b665813c876 /tools/render-test/cpu-compute-util.h | |
| parent | 11f331771a8d5d80bc1dd317dcad5eb815e9cb55 (diff) | |
Support CUDA bindless texture in dynamic dispatch code. (#1575)
Diffstat (limited to 'tools/render-test/cpu-compute-util.h')
| -rw-r--r-- | tools/render-test/cpu-compute-util.h | 12 |
1 files changed, 9 insertions, 3 deletions
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<BindSet::Value*> m_buffers; + + /// Bindless resource objects + Slang::OrderedDictionary<Slang::String, RefPtr<Resource>> 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); |
