From 788baf659c5d2a98ac3b7fb33fbc001bafd3a7f7 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 29 Aug 2019 09:24:16 -0700 Subject: Updated comments --- Graphics/GraphicsEngine/interface/DeviceContext.h | 4 ++-- Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'Graphics') diff --git a/Graphics/GraphicsEngine/interface/DeviceContext.h b/Graphics/GraphicsEngine/interface/DeviceContext.h index ecbbd79a..c7dd3d21 100644 --- a/Graphics/GraphicsEngine/interface/DeviceContext.h +++ b/Graphics/GraphicsEngine/interface/DeviceContext.h @@ -582,8 +582,8 @@ public: /// Invalidates the cached context state. - /// This method should be called by say Unity plugin before (or after) - /// issuing draw commands to invalidate cached states. + /// This method should be called by an application to invalidate + /// internal cached states. virtual void InvalidateState() = 0; diff --git a/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h b/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h index 293815d9..d43fa61f 100644 --- a/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h @@ -59,9 +59,16 @@ public: /// \remarks Any command on the device context may potentially submit the command list for /// execution into the command queue and make it invalid. An application should /// never cache the pointer and should instead request the command list every time it - /// needs it.\n + /// needs it. + /// /// The engine manages the lifetimes of all command buffers, so an application must /// not call AddRef/Release methods on the returned interface. + /// + /// Diligent Engine internally keeps track of all resource state changes (vertex and index + /// buffers, pipeline states, render targets, etc.). If an application changes any of these + /// states in the command list, it must invalidate the engine's internal state tracking by + /// calling IDeviceContext::InvalidateState() and then manually restore all required states via + /// appropriate Diligent API calls. virtual ID3D12GraphicsCommandList* GetD3D12CommandList() = 0; }; -- cgit v1.2.3