diff options
Diffstat (limited to 'tools/gfx/d3d12/d3d12-command-buffer.h')
| -rw-r--r-- | tools/gfx/d3d12/d3d12-command-buffer.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/tools/gfx/d3d12/d3d12-command-buffer.h b/tools/gfx/d3d12/d3d12-command-buffer.h index 1cc6e8850..192be9e2b 100644 --- a/tools/gfx/d3d12/d3d12-command-buffer.h +++ b/tools/gfx/d3d12/d3d12-command-buffer.h @@ -2,13 +2,14 @@ #pragma once #include "d3d12-base.h" -#include "d3d12-shader-object.h" #include "d3d12-command-encoder.h" +#include "d3d12-shader-object.h" #ifndef __ID3D12GraphicsCommandList1_FWD_DEFINED__ // If can't find a definition of CommandList1, just use an empty definition struct ID3D12GraphicsCommandList1 -{}; +{ +}; #endif namespace gfx @@ -18,9 +19,7 @@ namespace d3d12 using namespace Slang; -class CommandBufferImpl - : public ICommandBufferD3D12 - , public ComObject +class CommandBufferImpl : public ICommandBufferD3D12, public ComObject { public: // There are a pair of cyclic references between a `TransientResourceHeap` and @@ -28,7 +27,7 @@ public: // the public reference count of a command buffer dropping to 0. SLANG_COM_OBJECT_IUNKNOWN_ALL - ICommandBufferD3D12* getInterface(const Guid& guid); + ICommandBufferD3D12* getInterface(const Guid& guid); virtual void comFree() override { m_transientHeap.breakStrongReference(); } virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle* handle) override; @@ -49,8 +48,14 @@ public: void bindDescriptorHeaps(); - virtual SLANG_NO_THROW void SLANG_MCALL invalidateDescriptorHeapBinding() override { m_descriptorHeapsBound = false; } - virtual SLANG_NO_THROW void SLANG_MCALL ensureInternalDescriptorHeapsBound() override { bindDescriptorHeaps(); } + virtual SLANG_NO_THROW void SLANG_MCALL invalidateDescriptorHeapBinding() override + { + m_descriptorHeapsBound = false; + } + virtual SLANG_NO_THROW void SLANG_MCALL ensureInternalDescriptorHeapsBound() override + { + bindDescriptorHeaps(); + } void reinit(); @@ -62,7 +67,7 @@ public: ResourceCommandEncoderImpl m_resourceCommandEncoder; virtual SLANG_NO_THROW void SLANG_MCALL - encodeResourceCommands(IResourceCommandEncoder** outEncoder) override; + encodeResourceCommands(IResourceCommandEncoder** outEncoder) override; RenderCommandEncoderImpl m_renderCommandEncoder; virtual SLANG_NO_THROW void SLANG_MCALL encodeRenderCommands( @@ -72,13 +77,13 @@ public: ComputeCommandEncoderImpl m_computeCommandEncoder; virtual SLANG_NO_THROW void SLANG_MCALL - encodeComputeCommands(IComputeCommandEncoder** outEncoder) override; + encodeComputeCommands(IComputeCommandEncoder** outEncoder) override; #if SLANG_GFX_HAS_DXR_SUPPORT RayTracingCommandEncoderImpl m_rayTracingCommandEncoder; #endif virtual SLANG_NO_THROW void SLANG_MCALL - encodeRayTracingCommands(IRayTracingCommandEncoder** outEncoder) override; + encodeRayTracingCommands(IRayTracingCommandEncoder** outEncoder) override; virtual SLANG_NO_THROW void SLANG_MCALL close() override; }; |
