diff options
| author | Yong He <yonghe@outlook.com> | 2021-03-31 11:35:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-31 11:35:17 -0700 |
| commit | 3f1632a1450a5879f337b4bd178e48880cd583f8 (patch) | |
| tree | db4adc2ac0f6113dfd4a97a0e2f7a0c4312ef48b /tools/platform | |
| parent | 5fde038b1a6b3c8b335cd5b380c3ee8d15403052 (diff) | |
`gfx` explicit transient resource management. (#1774)
Diffstat (limited to 'tools/platform')
| -rw-r--r-- | tools/platform/gui.cpp | 4 | ||||
| -rw-r--r-- | tools/platform/gui.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/platform/gui.cpp b/tools/platform/gui.cpp index e33a504bb..f78a52ce4 100644 --- a/tools/platform/gui.cpp +++ b/tools/platform/gui.cpp @@ -188,7 +188,7 @@ void GUI::beginFrame() ImGui::NewFrame(); } -void GUI::endFrame(IFramebuffer* framebuffer) +void GUI::endFrame(ITransientResourceHeap* transientHeap, IFramebuffer* framebuffer) { ImGui::Render(); @@ -217,7 +217,7 @@ void GUI::endFrame(IFramebuffer* framebuffer) auto indexBuffer = device->createBufferResource( IResource::Usage::IndexBuffer, indexBufferDesc); - auto cmdBuf = queue->createCommandBuffer(); + auto cmdBuf = transientHeap->createCommandBuffer(); auto encoder = cmdBuf->encodeResourceCommands(); { for(int ii = 0; ii < commandListCount; ++ii) diff --git a/tools/platform/gui.h b/tools/platform/gui.h index ef5310cd4..e3975f3ff 100644 --- a/tools/platform/gui.h +++ b/tools/platform/gui.h @@ -19,7 +19,7 @@ struct GUI : Slang::RefObject ~GUI(); void beginFrame(); - void endFrame(gfx::IFramebuffer* framebuffer); + void endFrame(gfx::ITransientResourceHeap* transientHeap, gfx::IFramebuffer* framebuffer); private: Slang::ComPtr<gfx::IDevice> device; |
