Diligent::IDeviceContextD3D12 struct

Exposes Direct3D12-specific functionality of a device context.

Contents

Base classes

struct IDeviceContext
Device context interface.

Public functions

auto TransitionTextureState(ITexture* pTexture, D3D12_RESOURCE_STATES State) -> void METHOD() virtual
Transitions internal D3D12 texture object to a specified state.
auto TransitionBufferState(IBuffer* pBuffer, D3D12_RESOURCE_STATES State) -> void METHOD() virtual
Transitions internal D3D12 buffer object to a specified state.
auto GetD3D12CommandList() -> ID3D12GraphicsCommandList*METHOD() virtual
Returns a pointer to Direct3D12 graphics command list that is currently being recorded.
auto LockCommandQueue() -> ICommandQueueD3D12*METHOD() virtual
Locks the internal mutex and returns a pointer to the command queue that is associated with this device context.
auto UnlockCommandQueue() -> void METHOD() virtual
Unlocks the command queue that was previously locked by IDeviceContextD3D12::LockCommandQueue().

Function documentation

void METHOD() Diligent::IDeviceContextD3D12::TransitionTextureState(ITexture* pTexture, D3D12_RESOURCE_STATES State) virtual

Transitions internal D3D12 texture object to a specified state.

Parameters
pTexture in - texture to transition
State in - D3D12 resource state this texture to transition to

void METHOD() Diligent::IDeviceContextD3D12::TransitionBufferState(IBuffer* pBuffer, D3D12_RESOURCE_STATES State) virtual

Transitions internal D3D12 buffer object to a specified state.

Parameters
pBuffer in - Buffer to transition
State in - D3D12 resource state this buffer to transition to

ID3D12GraphicsCommandList*METHOD() Diligent::IDeviceContextD3D12::GetD3D12CommandList() virtual

Returns a pointer to Direct3D12 graphics command list that is currently being recorded.

Returns - a pointer to the current command list

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.

ICommandQueueD3D12*METHOD() Diligent::IDeviceContextD3D12::LockCommandQueue() virtual

Locks the internal mutex and returns a pointer to the command queue that is associated with this device context.

Returns - a pointer to ICommandQueueD3D12 interface of the command queue associated with the context.