diff options
| author | Yong He <yonghe@outlook.com> | 2022-03-11 11:57:53 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-11 11:57:53 -0800 |
| commit | 0890fd8f2e485bfdd93ff6227be08ff4142e55d1 (patch) | |
| tree | be8d2381d0f0e96b267428046dcad815fcafd245 /slang-gfx.h | |
| parent | f6c2a0f81340a0efd10e286a3cbe33e1b564a11b (diff) | |
gfx: Add `ITransientResourceHeap::finish()` to avoid `Signal` after every queue submit. (#2158)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'slang-gfx.h')
| -rw-r--r-- | slang-gfx.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/slang-gfx.h b/slang-gfx.h index e9d33bc98..5350444e9 100644 --- a/slang-gfx.h +++ b/slang-gfx.h @@ -1890,8 +1890,17 @@ public: uint32_t constantBufferDescriptorCount; uint32_t accelerationStructureDescriptorCount; }; + + // Waits until GPU commands issued before last call to `finish()` has been completed, and resets + // all transient resources holds by the heap. + // This method must be called before using the transient heap to issue new GPU commands. + // In most situations this method should be called at the beginning of each frame. virtual SLANG_NO_THROW Result SLANG_MCALL synchronizeAndReset() = 0; + // Must be called when the application has done using this heap to issue commands. In most situations + // this method should be called at the end of each frame. + virtual SLANG_NO_THROW Result SLANG_MCALL finish() = 0; + // Command buffers are one-time use. Once it is submitted to the queue via // `executeCommandBuffers` a command buffer is no longer valid to be used any more. Command // buffers must be closed before submission. The current D3D12 implementation has a limitation |
