UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FD3D12CommandContext Class Reference

#include <D3D12CommandContext.h>

+ Inheritance diagram for FD3D12CommandContext:

Public Member Functions

 FD3D12CommandContext (class FD3D12Device *InParent, ED3D12QueueType QueueType, bool InIsDefaultContext)
 
virtual ~FD3D12CommandContext ()
 
virtual void OpenCommandList () override
 
virtual void CloseCommandList () override final
 
virtual ERHIPipeline GetPipeline () const override
 
virtual void ClearState (EClearStateMode ClearStateMode=EClearStateMode::All) override final
 
virtual void ConditionalClearShaderResource (FD3D12ResourceLocation *Resource, EShaderParameterTypeMask ShaderParameterTypeMask) override final
 
void ClearShaderResources (FD3D12UnorderedAccessView *UAV, EShaderParameterTypeMask ShaderParameterTypeMask)
 
void ClearShaderResources (FD3D12BaseShaderResource *Resource, EShaderParameterTypeMask ShaderParameterTypeMask)
 
void ClearAllShaderResources ()
 
void CommitNonComputeShaderConstants ()
 
void CommitComputeShaderConstants ()
 
template<class ShaderType >
void SetResourcesFromTables (const ShaderType *RESTRICT)
 
void SetSRVParameter (EShaderFrequency Frequency, uint32 SRVIndex, FD3D12ShaderResourceView *SRV)
 
void SetUAVParameter (EShaderFrequency Frequency, uint32 UAVIndex, FD3D12UnorderedAccessView *UAV)
 
void SetUAVParameter (EShaderFrequency Frequency, uint32 UAVIndex, FD3D12UnorderedAccessView *UAV, uint32 InitialCount)
 
void CommitGraphicsResourceTables ()
 
void CommitComputeResourceTables ()
 
template<typename TPixelShader >
void ResolveTextureUsingShader (FD3D12Texture *SourceTexture, FD3D12Texture *DestTexture, FD3D12RenderTargetView *DestSurfaceRTV, FD3D12DepthStencilView *DestSurfaceDSV, const D3D12_RESOURCE_DESC &ResolveTargetDesc, const FResolveRect &SourceRect, const FResolveRect &DestRect, typename TPixelShader::FParameter PixelShaderParameter)
 
virtual void SetDepthBounds (float MinDepth, float MaxDepth)
 
virtual void SetShadingRate (EVRSShadingRate ShadingRate, FD3D12Resource *ShadingRateImage, const TStaticArray< EVRSRateCombiner, ED3D12VRSCombinerStages::Num > &Combiners)
 
virtual void SetAsyncComputeBudgetInternal (EAsyncComputeBudget Budget)
 
virtual void RHIBeginTransitions (TArrayView< const FRHITransition * > Transitions) final override
 
virtual void RHIEndTransitions (TArrayView< const FRHITransition * > Transitions) final override
 
virtual void RHISetComputePipelineState (FRHIComputePipelineState *ComputePipelineState) final override
 
virtual void RHIDispatchComputeShader (uint32 ThreadGroupCountX, uint32 ThreadGroupCountY, uint32 ThreadGroupCountZ) final override
 
virtual void RHIDispatchIndirectComputeShader (FRHIBuffer *ArgumentBuffer, uint32 ArgumentOffset) final override
 
virtual void RHISetStaticUniformBuffers (const FUniformBufferStaticBindings &InUniformBuffers) final override
 
virtual void RHISetStaticUniformBuffer (FUniformBufferStaticSlot Slot, FRHIUniformBuffer *Buffer) final override
 
virtual void RHISetShaderParameters (FRHIComputeShader *Shader, TConstArrayView< uint8 > InParametersData, TConstArrayView< FRHIShaderParameter > InParameters, TConstArrayView< FRHIShaderParameterResource > InResourceParameters, TConstArrayView< FRHIShaderParameterResource > InBindlessParameters) final override
 
virtual void RHISetShaderUnbinds (FRHIComputeShader *Shader, TConstArrayView< FRHIShaderParameterUnbind > InUnbinds) final override
 
virtual void RHISetShaderUnbinds (FRHIGraphicsShader *Shader, TConstArrayView< FRHIShaderParameterUnbind > InUnbinds) final override
 
virtual void RHISetMultipleViewports (uint32 Count, const FViewportBounds *Data) final override
 
virtual void RHIClearUAVFloat (FRHIUnorderedAccessView *UnorderedAccessViewRHI, const FVector4f &Values) final override
 
virtual void RHIClearUAVUint (FRHIUnorderedAccessView *UnorderedAccessViewRHI, const FUintVector4 &Values) final override
 
virtual void RHICopyTexture (FRHITexture *SourceTexture, FRHITexture *DestTexture, const FRHICopyTextureInfo &CopyInfo) final override
 
virtual void RHICopyBufferRegion (FRHIBuffer *DestBuffer, uint64 DstOffset, FRHIBuffer *SourceBuffer, uint64 SrcOffset, uint64 NumBytes) final override
 
virtual void RHICopyToStagingBuffer (FRHIBuffer *SourceBuffer, FRHIStagingBuffer *DestinationStagingBuffer, uint32 Offset, uint32 NumBytes) final override
 
virtual void RHIBeginRenderQuery (FRHIRenderQuery *RenderQuery) final override
 
virtual void RHIEndRenderQuery (FRHIRenderQuery *RenderQuery) final override
 
virtual void RHICalibrateTimers (FRHITimestampCalibrationQuery *CalibrationQuery) final override
 
virtual void RHISetStreamSource (uint32 StreamIndex, FRHIBuffer *VertexBuffer, uint32 Offset) final override
 
virtual void RHISetViewport (float MinX, float MinY, float MinZ, float MaxX, float MaxY, float MaxZ) final override
 
virtual void RHISetStereoViewport (float LeftMinX, float RightMinX, float LeftMinY, float RightMinY, float MinZ, float LeftMaxX, float RightMaxX, float LeftMaxY, float RightMaxY, float MaxZ) override
 
virtual void RHISetScissorRect (bool bEnable, uint32 MinX, uint32 MinY, uint32 MaxX, uint32 MaxY) final override
 
virtual void RHISetGraphicsPipelineState (FRHIGraphicsPipelineState *GraphicsPipelineState, uint32 StencilRef, bool bApplyAdditionalState) final override
 
virtual void RHISetShaderParameters (FRHIGraphicsShader *Shader, TConstArrayView< uint8 > InParametersData, TConstArrayView< FRHIShaderParameter > InParameters, TConstArrayView< FRHIShaderParameterResource > InResourceParameters, TConstArrayView< FRHIShaderParameterResource > InBindlessParameters) final override
 
virtual void RHISetStencilRef (uint32 StencilRef) final override
 
virtual void RHISetBlendFactor (const FLinearColor &BlendFactor) final override
 
void SetRenderTargets (uint32 NumSimultaneousRenderTargets, const FRHIRenderTargetView *NewRenderTargets, const FRHIDepthRenderTargetView *NewDepthStencilTarget)
 
void SetRenderTargetsAndClear (const FRHISetRenderTargetsInfo &RenderTargetsInfo)
 
virtual void RHISetShaderRootConstants (const FUint32Vector4 &Constants) override
 
virtual void RHIDispatchComputeShaderBundle (FRHIShaderBundle *ShaderBundle, FRHIBuffer *RecordArgBuffer, TConstArrayView< FRHIShaderParameterResource > SharedBindlessParameters, TConstArrayView< FRHIShaderBundleComputeDispatch > Dispatches, bool bEmulated) override
 
virtual void RHIDispatchGraphicsShaderBundle (FRHIShaderBundle *ShaderBundle, FRHIBuffer *RecordArgBuffer, const FRHIShaderBundleGraphicsState &BundleState, TConstArrayView< FRHIShaderParameterResource > SharedBindlessParameters, TConstArrayView< FRHIShaderBundleGraphicsDispatch > Dispatches, bool bEmulated) override
 
virtual void RHIDrawPrimitive (uint32 BaseVertexIndex, uint32 NumPrimitives, uint32 NumInstances) final override
 
virtual void RHIDrawPrimitiveIndirect (FRHIBuffer *ArgumentBuffer, uint32 ArgumentOffset) final override
 
virtual void RHIDrawIndexedIndirect (FRHIBuffer *IndexBufferRHI, FRHIBuffer *ArgumentsBufferRHI, int32 DrawArgumentsIndex, uint32 NumInstances) final override
 
virtual void RHIDrawIndexedPrimitive (FRHIBuffer *IndexBuffer, int32 BaseVertexIndex, uint32 FirstInstance, uint32 NumVertices, uint32 StartIndex, uint32 NumPrimitives, uint32 NumInstances) final override
 
virtual void RHIDrawIndexedPrimitiveIndirect (FRHIBuffer *IndexBuffer, FRHIBuffer *ArgumentBuffer, uint32 ArgumentOffset) final override
 
virtual void RHIMultiDrawIndexedPrimitiveIndirect (FRHIBuffer *IndexBuffer, FRHIBuffer *ArgumentBuffer, uint32 ArgumentOffset, FRHIBuffer *CountBuffer, uint32 CountBufferOffset, uint32 MaxDrawArguments) final override
 
virtual void RHISetDepthBounds (float MinDepth, float MaxDepth) final override
 
virtual void RHISetShadingRate (EVRSShadingRate ShadingRate, EVRSRateCombiner Combiner) final override
 
virtual void RHIClearMRTImpl (bool *bClearColorArray, int32 NumClearColors, const FLinearColor *ColorArray, bool bClearDepth, float Depth, bool bClearStencil, uint32 Stencil)
 
virtual void RHIBeginRenderPass (const FRHIRenderPassInfo &InInfo, const TCHAR *InName)
 
virtual void RHIEndRenderPass ()
 
void ResolveTexture (UE::RHICore::FResolveTextureInfo Info)
 
template<typename ObjectType , typename RHIType >
FORCEINLINE_DEBUGGABLE ObjectType * RetrieveObject (RHIType *RHIObject)
 
FORCEINLINE_DEBUGGABLE FD3D12TextureRetrieveTexture (FRHITexture *Texture)
 
FORCEINLINE_DEBUGGABLE const FD3D12TextureRetrieveTexture (const FRHITexture *Texture)
 
uint32 GetFrameFenceCounter () const
 
uint32 GetGPUIndex () const
 
virtual void RHISetGPUMask (FRHIGPUMask InGPUMask) final override
 
const TArray< FRHIUniformBuffer * > & GetStaticUniformBuffers () const
 
void FlushPendingDescriptorUpdates ()
 
void SetExplicitDescriptorCache (FD3D12ExplicitDescriptorCache &ExplicitDescriptorCache)
 
void UnsetExplicitDescriptorCache ()
 
virtual void Finalize (TArray< FD3D12Payload * > &OutPayloads) override
 
const FRHIShaderBindingLayoutGetShaderBindingLayout () const
 
FORCENOINLINE void CopyBufferRegionChecked (ID3D12Resource *DestResource, const FName &DestName, uint64 DestOffset, ID3D12Resource *SourceResource, const FName &SourceName, uint64 SourceOffset, uint32 ByteCount)
 
FORCENOINLINE void CopyTextureRegionChecked (const D3D12_TEXTURE_COPY_LOCATION *DestCopyLocation, int DestX, int DestY, int DestZ, EPixelFormat DestPixelFormat, const D3D12_TEXTURE_COPY_LOCATION *SourceCopyLocation, const D3D12_BOX *SourceBox, EPixelFormat SourcePixelFormat, const FName &DebugName)
 
template<class ShaderType >
void SetResourcesFromTables (const ShaderType *RESTRICT Shader)
 
- Public Member Functions inherited from FD3D12ContextCommon
virtual ~FD3D12ContextCommon ()=default
 
void SignalSyncPoint (FD3D12SyncPoint *SyncPoint)
 
void WaitSyncPoint (FD3D12SyncPoint *SyncPoint)
 
void SignalManualFence (ID3D12Fence *Fence, uint64 Value)
 
void WaitManualFence (ID3D12Fence *Fence, uint64 Value)
 
FD3D12QueryLocation InsertTimestamp (ED3D12Units Units, uint64 *Target)
 
FD3D12QueryLocation AllocateQuery (ED3D12QueryType Type, void *Target)
 
void SetReservedBufferCommitSize (FD3D12Buffer *Buffer, uint64 CommitSizeInBytes)
 
bool IsAsyncComputeContext () const
 
ERHIPipeline GetRHIPipeline () const
 
bool IsDefaultContext () const
 
bool IsOpen () const
 
bool IsPendingCommands () const
 
FD3D12SyncPointGetContextSyncPoint ()
 
void BindDiagnosticBuffer (FD3D12RootSignature const *RootSignature, ED3D12PipelineType PipelineType)
 
FD3D12QueryAllocatorGetTimestampQueries ()
 
void BeginRecursiveCommand ()
 
FD3D12CommandListGetCommandList ()
 
void OpenIfNotAlready ()
 
void FlushCommands (ED3D12FlushFlags FlushFlags=ED3D12FlushFlags::None)
 
void ConditionalSplitCommandList ()
 
auto BaseCommandList ()
 
auto CopyCommandList ()
 
auto GraphicsCommandList ()
 
void BeginQuery (FD3D12QueryLocation const &Location)
 
void EndQuery (FD3D12QueryLocation const &Location)
 
void UpdateResidency (const FD3D12Resource *Resource)
 
void AddGlobalBarrier (ED3D12Access InD3D12AccessBefore, ED3D12Access InD3D12AccessAfter)
 
void AddBarrier (const FD3D12Resource *pResource, ED3D12Access InD3D12AccessBefore, ED3D12Access InD3D12AccessAfter, uint32 Subresource)
 
void FlushResourceBarriers ()
 
- Public Member Functions inherited from FD3D12CommandContextBase
 FD3D12CommandContextBase (FD3D12Adapter *InParent, FRHIGPUMask InGPUMask)
 
void RHIEndDrawingViewport (FRHIViewport *Viewport, bool bPresent, bool bLockToVsync) final override
 
FRHIGPUMask GetGPUMask () const
 
FRHIGPUMask GetPhysicalGPUMask () const
 
virtual void RHISetAsyncComputeBudget (EAsyncComputeBudget Budget)
 
virtual class FD3D12CommandContextRedirectorAsRedirector ()
 
- Public Member Functions inherited from IRHICommandContext
virtual ~IRHICommandContext ()
 
virtual void RHIResummarizeHTile (FRHITexture *DepthTexture)
 
void RHISetBatchedShaderParameters (FRHIGraphicsShader *InShader, FRHIBatchedShaderParameters &InBatchedParameters)
 
virtual void RHIDispatchMeshShader (uint32 ThreadGroupCountX, uint32 ThreadGroupCountY, uint32 ThreadGroupCountZ)
 
virtual void RHIDispatchIndirectMeshShader (FRHIBuffer *ArgumentBuffer, uint32 ArgumentOffset)
 
virtual void RHIGpuHangCommandListCorruption ()
 
virtual void RHIBeginParallelRenderPass (TSharedPtr< FRHIParallelRenderPassInfo > InInfo, const TCHAR *InName)
 
virtual void RHIEndParallelRenderPass ()
 
virtual void RHINextSubpass ()
 
virtual void RHIClearShaderBindingTable (FRHIShaderBindingTable *SBT)
 
virtual void RHISetBindingsOnShaderBindingTable (FRHIShaderBindingTable *SBT, FRHIRayTracingPipelineState *Pipeline, uint32 NumBindings, const FRayTracingLocalShaderBindings *Bindings, ERayTracingBindingType BindingType)
 
virtual void RHICommitShaderBindingTable (FRHIShaderBindingTable *SBT, FRHIBuffer *InlineBindingDataBuffer)
 
virtual void RHISetShaderParameters (FRHIComputeShader *ComputeShader, TConstArrayView< uint8 > InParametersData, TConstArrayView< FRHIShaderParameter > InParameters, TConstArrayView< FRHIShaderParameterResource > InResourceParameters, TConstArrayView< FRHIShaderParameterResource > InBindlessParameters)=0
 
void RHISetBatchedShaderParameters (FRHIComputeShader *InShader, FRHIBatchedShaderParameters &InBatchedParameters)
 
virtual void RHISetShaderUnbinds (FRHIComputeShader *ComputeShader, TConstArrayView< FRHIShaderParameterUnbind > InUnbinds)
 
- Public Member Functions inherited from IRHIComputeContext
virtual ~IRHIComputeContext ()
 
virtual void RHIRayTraceDispatch (FRHIRayTracingPipelineState *RayTracingPipelineState, FRHIRayTracingShader *RayGenShader, FRHIShaderBindingTable *SBT, const FRayTracingShaderBindings &GlobalResourceBindings, uint32 Width, uint32 Height)
 
virtual void RHIRayTraceDispatchIndirect (FRHIRayTracingPipelineState *RayTracingPipelineState, FRHIRayTracingShader *RayGenShader, FRHIShaderBindingTable *SBT, const FRayTracingShaderBindings &GlobalResourceBindings, FRHIBuffer *ArgumentBuffer, uint32 ArgumentOffset)
 
virtual void RHISetComputeBudget (ESyncComputeBudget Budget)
 
virtual void RHIBeginUAVOverlap ()
 
virtual void RHIEndUAVOverlap ()
 
virtual void RHIBeginUAVOverlap (TConstArrayView< FRHIUnorderedAccessView * > UAVs)
 
virtual void RHIEndUAVOverlap (TConstArrayView< FRHIUnorderedAccessView * > UAVs)
 
void RHISetBatchedShaderParameters (FRHIComputeShader *InShader, FRHIBatchedShaderParameters &InBatchedParameters)
 
virtual void RHISetUniformBufferDynamicOffset (FUniformBufferStaticSlot Slot, uint32 Offset)
 
virtual void RHIWriteGPUFence (FRHIGPUFence *FenceRHI)
 
virtual FRHIGPUMask RHIGetGPUMask () const
 
virtual void RHIExecuteMultiIndirectClusterOperation (const FRayTracingClusterOperationParams &Params)
 
virtual void RHIBuildAccelerationStructures (TConstArrayView< FRayTracingGeometryBuildParams > Params, const FRHIBufferRange &ScratchBufferRange)
 
virtual void RHIBuildAccelerationStructures (TConstArrayView< FRayTracingSceneBuildParams > Params)
 
virtual void RHIBindAccelerationStructureMemory (FRHIRayTracingScene *Scene, FRHIBuffer *Buffer, uint32 BufferOffset)
 
IRHIComputeContextGetLowestLevelContext ()
 
IRHIComputeContext const & GetHighestLevelContext () const
 
IRHIComputeContextGetHighestLevelContext ()
 
void SetTrackedAccess (const FRHITrackedAccessInfo &Info)
 
ERHIAccess GetTrackedAccess (const FRHIViewableResource *Resource) const
 
ERHIPipeline GetTrackedPipelines (const FRHIViewableResource *Resource) const
 
virtual voidRHIGetNativeCommandBuffer ()
 
virtual void RHIPostExternalCommandsReset ()
 
FRHICommandListBaseGetExecutingCommandList () const
 
virtual void SetExecutingCommandList (FRHICommandListBase *InCmdList)
 
- Public Member Functions inherited from FD3D12AdapterChild
 FD3D12AdapterChild (FD3D12Adapter *InParent=nullptr)
 
FORCEINLINE FD3D12AdapterGetParentAdapter () const
 
void SetParentAdapter (FD3D12Adapter *InParent)
 
- Public Member Functions inherited from FD3D12DeviceChild
 FD3D12DeviceChild (FD3D12Device *InParent=nullptr)
 
FORCEINLINE FD3D12DeviceGetParentDevice () const
 
FD3D12DeviceGetParentDevice_Unsafe () const
 

Static Public Member Functions

static FD3D12CommandContextGet (FRHICommandListBase &RHICmdList, uint32 GPUIndex)
 
template<typename TRHIType , typename TReturnType = typename TD3D12ResourceTraits<TRHIType>::TConcreteType>
static FORCEINLINE TReturnTypeResourceCast (TRHIType *Resource)
 
template<typename TRHIType , typename TReturnType = typename TD3D12ResourceTraits<TRHIType>::TConcreteType>
static FORCEINLINE_DEBUGGABLE TReturnTypeResourceCast (TRHIType *Resource, uint32 GPUIndex)
 
template<typename ObjectType , typename RHIType >
static FORCEINLINE_DEBUGGABLE ObjectType * RetrieveObject (RHIType *RHIObject, uint32 GPUIndex)
 
static FD3D12TextureRetrieveTexture (FRHITexture *Texture, uint32 GPUIndex)
 
- Static Public Member Functions inherited from FD3D12CommandContextBase
static FD3D12CommandContextBaseGet (FRHICommandListBase &RHICmdList)
 
static FD3D12CommandContextBaseGet (IRHIComputeContext *RHIContext)
 

Public Attributes

FD3D12FastConstantAllocator ConstantsAllocator
 
TArray< uint32GPUEventStack
 
FD3D12StateCache StateCache
 
FD3D12UniformBufferBoundUniformBuffers [SF_NumStandardFrequencies][MAX_CBS] = {}
 
uint16 DirtyUniformBuffers [SF_NumStandardFrequencies] = {}
 
FRenderQueryRHIRef OuterOcclusionQuery
 
bool bOuterOcclusionQuerySubmitted = false
 
bool bDiscardSharedGraphicsConstants = false
 
bool bDiscardSharedComputeConstants = false
 
FD3D12ConstantBuffer StageConstantBuffers [SF_NumStandardFrequencies]
 
- Public Attributes inherited from FD3D12ContextCommon
FD3D12Device *const Device
 
ED3D12QueueType const QueueType
 
bool const bIsDefaultContext
 
struct { 
 
   TArray< FD3D12SyncPointRef >   ToWait 
 
   TArray< FD3D12SyncPointRef >   ToSignal 
 
BatchedSyncPoints 
 

Protected Member Functions

FD3D12CommandContextGetSingleDeviceContext (uint32 InGPUIndex) final override
 
- Protected Member Functions inherited from FD3D12ContextCommon
 FD3D12ContextCommon (FD3D12Device *Device, ED3D12QueueType QueueType, bool bIsDefaultContext)
 
void WriteMarker (D3D12_GPU_VIRTUAL_ADDRESS Address, uint32 Value, EMarkerType Type)
 
FD3D12PayloadGetPayload (EPhase Phase)
 
void NewPayload ()
 

Additional Inherited Members

- Public Types inherited from FD3D12ContextCommon
enum class  EClearStateMode { TransientOnly , All }
 
- Protected Types inherited from FD3D12ContextCommon
enum class  EMarkerType { In , Out }
 
enum class  EPhase { Wait , UpdateReservedResources , Execute , Signal }
 
- Protected Attributes inherited from FD3D12ContextCommon
enum FD3D12ContextCommon::EPhase CurrentPhase = EPhase::Wait
 
uint32 ActiveQueries = 0
 
const TUniquePtr< FD3D12BarriersFactory::BarriersForContextTypeBarriers
 
- Protected Attributes inherited from FD3D12CommandContextBase
FRHIGPUMask GPUMask
 
FRHIGPUMask PhysicalGPUMask
 
- Protected Attributes inherited from IRHICommandContext
FRHIRenderPassInfo RenderPassInfo
 
- Protected Attributes inherited from IRHIComputeContext
UE::RHI::GPUProfiler::FEvent::FStats StatEvent {}
 
- Protected Attributes inherited from FD3D12AdapterChild
FD3D12AdapterParentAdapter
 
- Protected Attributes inherited from FD3D12DeviceChild
FD3D12DeviceParent
 

Constructor & Destructor Documentation

◆ FD3D12CommandContext()

FD3D12CommandContext::FD3D12CommandContext ( class FD3D12Device InParent,
ED3D12QueueType  QueueType,
bool  InIsDefaultContext 
)

◆ ~FD3D12CommandContext()

FD3D12CommandContext::~FD3D12CommandContext ( )
virtual

Member Function Documentation

◆ ClearAllShaderResources()

void FD3D12CommandContext::ClearAllShaderResources ( )

◆ ClearShaderResources() [1/2]

void FD3D12CommandContext::ClearShaderResources ( FD3D12BaseShaderResource Resource,
EShaderParameterTypeMask  ShaderParameterTypeMask 
)

◆ ClearShaderResources() [2/2]

void FD3D12CommandContext::ClearShaderResources ( FD3D12UnorderedAccessView UAV,
EShaderParameterTypeMask  ShaderParameterTypeMask 
)

◆ ClearState()

void FD3D12CommandContext::ClearState ( EClearStateMode  ClearStateMode = EClearStateMode::All)
finaloverridevirtual

Reimplemented from FD3D12ContextCommon.

◆ CloseCommandList()

void FD3D12CommandContext::CloseCommandList ( )
finaloverridevirtual

Reimplemented from FD3D12ContextCommon.

◆ CommitComputeResourceTables()

void FD3D12CommandContext::CommitComputeResourceTables ( )

◆ CommitComputeShaderConstants()

void FD3D12CommandContext::CommitComputeShaderConstants ( )

needs to be called before each dispatch call

◆ CommitGraphicsResourceTables()

void FD3D12CommandContext::CommitGraphicsResourceTables ( )

◆ CommitNonComputeShaderConstants()

void FD3D12CommandContext::CommitNonComputeShaderConstants ( )

needs to be called before each draw call

◆ ConditionalClearShaderResource()

void FD3D12CommandContext::ConditionalClearShaderResource ( FD3D12ResourceLocation Resource,
EShaderParameterTypeMask  ShaderParameterTypeMask 
)
finaloverridevirtual

Reimplemented from FD3D12ContextCommon.

◆ CopyBufferRegionChecked()

void FD3D12CommandContext::CopyBufferRegionChecked ( ID3D12Resource DestResource,
const FName DestName,
uint64  DestOffset,
ID3D12Resource SourceResource,
const FName SourceName,
uint64  SourceOffset,
uint32  ByteCount 
)

◆ CopyTextureRegionChecked()

FORCENOINLINE void FD3D12CommandContext::CopyTextureRegionChecked ( const D3D12_TEXTURE_COPY_LOCATION DestCopyLocation,
int  DestX,
int  DestY,
int  DestZ,
EPixelFormat  DestPixelFormat,
const D3D12_TEXTURE_COPY_LOCATION SourceCopyLocation,
const D3D12_BOX SourceBox,
EPixelFormat  SourcePixelFormat,
const FName DebugName 
)

◆ Finalize()

void FD3D12CommandContext::Finalize ( TArray< FD3D12Payload * > &  OutPayloads)
overridevirtual

Reimplemented from FD3D12ContextCommon.

◆ FlushPendingDescriptorUpdates()

void FD3D12CommandContext::FlushPendingDescriptorUpdates ( )

◆ Get()

static FD3D12CommandContext & FD3D12CommandContext::Get ( FRHICommandListBase RHICmdList,
uint32  GPUIndex 
)
inlinestatic

◆ GetFrameFenceCounter()

uint32 FD3D12CommandContext::GetFrameFenceCounter ( ) const

◆ GetGPUIndex()

uint32 FD3D12CommandContext::GetGPUIndex ( ) const
inline

◆ GetPipeline()

virtual ERHIPipeline FD3D12CommandContext::GetPipeline ( ) const
inlineoverridevirtual

Reimplemented from IRHICommandContext.

◆ GetShaderBindingLayout()

const FRHIShaderBindingLayout & FD3D12CommandContext::GetShaderBindingLayout ( ) const
inline

◆ GetSingleDeviceContext()

FD3D12CommandContext * FD3D12CommandContext::GetSingleDeviceContext ( uint32  InGPUIndex)
inlinefinaloverrideprotectedvirtual

◆ GetStaticUniformBuffers()

const TArray< FRHIUniformBuffer * > & FD3D12CommandContext::GetStaticUniformBuffers ( ) const
inline

◆ OpenCommandList()

void FD3D12CommandContext::OpenCommandList ( )
overridevirtual

Reimplemented from FD3D12ContextCommon.

◆ ResolveTexture()

void FD3D12CommandContext::ResolveTexture ( UE::RHICore::FResolveTextureInfo  Info)

◆ ResolveTextureUsingShader()

template<typename TPixelShader >
void FD3D12CommandContext::ResolveTextureUsingShader ( FD3D12Texture SourceTexture,
FD3D12Texture DestTexture,
FD3D12RenderTargetView DestSurfaceRTV,
FD3D12DepthStencilView DestSurfaceDSV,
const D3D12_RESOURCE_DESC &  ResolveTargetDesc,
const FResolveRect SourceRect,
const FResolveRect DestRect,
typename TPixelShader::FParameter  PixelShaderParameter 
)

◆ ResourceCast() [1/2]

template<typename TRHIType , typename TReturnType = typename TD3D12ResourceTraits<TRHIType>::TConcreteType>
static FORCEINLINE TReturnType * FD3D12CommandContext::ResourceCast ( TRHIType Resource)
inlinestatic

◆ ResourceCast() [2/2]

template<typename TRHIType , typename TReturnType = typename TD3D12ResourceTraits<TRHIType>::TConcreteType>
static FORCEINLINE_DEBUGGABLE TReturnType * FD3D12CommandContext::ResourceCast ( TRHIType Resource,
uint32  GPUIndex 
)
inlinestatic

◆ RetrieveObject() [1/2]

template<typename ObjectType , typename RHIType >
FORCEINLINE_DEBUGGABLE ObjectType * FD3D12CommandContext::RetrieveObject ( RHIType RHIObject)
inline

◆ RetrieveObject() [2/2]

template<typename ObjectType , typename RHIType >
static FORCEINLINE_DEBUGGABLE ObjectType * FD3D12CommandContext::RetrieveObject ( RHIType RHIObject,
uint32  GPUIndex 
)
inlinestatic

◆ RetrieveTexture() [1/3]

FORCEINLINE_DEBUGGABLE const FD3D12Texture * FD3D12CommandContext::RetrieveTexture ( const FRHITexture Texture)
inline

◆ RetrieveTexture() [2/3]

FORCEINLINE_DEBUGGABLE FD3D12Texture * FD3D12CommandContext::RetrieveTexture ( FRHITexture Texture)
inline

◆ RetrieveTexture() [3/3]

static FD3D12Texture * FD3D12CommandContext::RetrieveTexture ( FRHITexture Texture,
uint32  GPUIndex 
)
inlinestatic

◆ RHIBeginRenderPass()

virtual void FD3D12CommandContext::RHIBeginRenderPass ( const FRHIRenderPassInfo InInfo,
const TCHAR InName 
)
inlinevirtual

Implements IRHICommandContext.

◆ RHIBeginRenderQuery()

void FD3D12CommandContext::RHIBeginRenderQuery ( FRHIRenderQuery RenderQuery)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIBeginTransitions()

void FD3D12CommandContext::RHIBeginTransitions ( TArrayView< const FRHITransition * >  Transitions)
finaloverridevirtual

Implements IRHIComputeContext.

◆ RHICalibrateTimers()

void FD3D12CommandContext::RHICalibrateTimers ( FRHITimestampCalibrationQuery CalibrationQuery)
finaloverridevirtual

◆ RHIClearMRTImpl()

void FD3D12CommandContext::RHIClearMRTImpl ( bool bClearColorArray,
int32  NumClearColors,
const FLinearColor ColorArray,
bool  bClearDepth,
float  Depth,
bool  bClearStencil,
uint32  Stencil 
)
virtual

◆ RHIClearUAVFloat()

void FD3D12CommandContext::RHIClearUAVFloat ( FRHIUnorderedAccessView UnorderedAccessViewRHI,
const FVector4f Values 
)
finaloverridevirtual

Clears a UAV to the multi-channel floating point value provided. Should only be called on UAVs with a floating point format, or on structured buffers. Structured buffers are treated as a regular R32_UINT buffer during the clear operation, and the Values.X component is copied directly into the buffer without any format conversion. (Y,Z,W) of Values is ignored. Typed floating point buffers undergo standard format conversion during the write operation. The conversion is determined by the format of the UAV.

Parameters
UnorderedAccessViewRHIThe UAV to clear.
ValuesThe values to clear the UAV to, one component per channel (XYZW = RGBA). Channels not supported by the UAV are ignored.

Implements IRHIComputeContext.

◆ RHIClearUAVUint()

void FD3D12CommandContext::RHIClearUAVUint ( FRHIUnorderedAccessView UnorderedAccessViewRHI,
const FUintVector4 Values 
)
finaloverridevirtual

Clears a UAV to the multi-component unsigned integer value provided. Should only be called on UAVs with an integer format, or on structured buffers. Structured buffers are treated as a regular R32_UINT buffer during the clear operation, and the Values.X component is copied directly into the buffer without any format conversion. (Y,Z,W) of Values is ignored. Typed integer buffers undergo standard format conversion during the write operation. The conversion is determined by the format of the UAV.

Parameters
UnorderedAccessViewRHIThe UAV to clear.
ValuesThe values to clear the UAV to, one component per channel (XYZW = RGBA). Channels not supported by the UAV are ignored.

Implements IRHIComputeContext.

◆ RHICopyBufferRegion()

void FD3D12CommandContext::RHICopyBufferRegion ( FRHIBuffer DestBuffer,
uint64  DstOffset,
FRHIBuffer SourceBuffer,
uint64  SrcOffset,
uint64  NumBytes 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHICopyTexture()

void FD3D12CommandContext::RHICopyTexture ( FRHITexture SourceTexture,
FRHITexture DestTexture,
const FRHICopyTextureInfo CopyInfo 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHICopyToStagingBuffer()

void FD3D12CommandContext::RHICopyToStagingBuffer ( FRHIBuffer SourceBufferRHI,
FRHIStagingBuffer DestinationStagingBufferRHI,
uint32  InOffset,
uint32  InNumBytes 
)
finaloverridevirtual

Performs a copy of the data in 'SourceBuffer' to 'DestinationStagingBuffer.' This will occur inline on the GPU timeline. This is a mechanism to perform nonblocking readback of a buffer at a point in time.

Parameters
SourceBufferThe source vertex buffer that will be inlined copied.
DestinationStagingBufferThe the host-visible destination buffer
OffsetThe start of the data in 'SourceBuffer'
NumBytesThe number of bytes to copy out of 'SourceBuffer'

Reimplemented from IRHIComputeContext.

◆ RHIDispatchComputeShader()

void FD3D12CommandContext::RHIDispatchComputeShader ( uint32  ThreadGroupCountX,
uint32  ThreadGroupCountY,
uint32  ThreadGroupCountZ 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIDispatchComputeShaderBundle()

void FD3D12CommandContext::RHIDispatchComputeShaderBundle ( FRHIShaderBundle ShaderBundle,
FRHIBuffer RecordArgBuffer,
TConstArrayView< FRHIShaderParameterResource SharedBindlessParameters,
TConstArrayView< FRHIShaderBundleComputeDispatch Dispatches,
bool  bEmulated 
)
overridevirtual

Reimplemented from IRHIComputeContext.

◆ RHIDispatchGraphicsShaderBundle()

void FD3D12CommandContext::RHIDispatchGraphicsShaderBundle ( FRHIShaderBundle ShaderBundle,
FRHIBuffer RecordArgBuffer,
const FRHIShaderBundleGraphicsState BundleState,
TConstArrayView< FRHIShaderParameterResource SharedBindlessParameters,
TConstArrayView< FRHIShaderBundleGraphicsDispatch Dispatches,
bool  bEmulated 
)
overridevirtual

Reimplemented from IRHIComputeContext.

◆ RHIDispatchIndirectComputeShader()

void FD3D12CommandContext::RHIDispatchIndirectComputeShader ( FRHIBuffer ArgumentBuffer,
uint32  ArgumentOffset 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIDrawIndexedIndirect()

void FD3D12CommandContext::RHIDrawIndexedIndirect ( FRHIBuffer IndexBufferRHI,
FRHIBuffer ArgumentsBufferRHI,
int32  DrawArgumentsIndex,
uint32  NumInstances 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIDrawIndexedPrimitive()

void FD3D12CommandContext::RHIDrawIndexedPrimitive ( FRHIBuffer IndexBuffer,
int32  BaseVertexIndex,
uint32  FirstInstance,
uint32  NumVertices,
uint32  StartIndex,
uint32  NumPrimitives,
uint32  NumInstances 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIDrawIndexedPrimitiveIndirect()

void FD3D12CommandContext::RHIDrawIndexedPrimitiveIndirect ( FRHIBuffer IndexBuffer,
FRHIBuffer ArgumentBuffer,
uint32  ArgumentOffset 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIDrawPrimitive()

void FD3D12CommandContext::RHIDrawPrimitive ( uint32  BaseVertexIndex,
uint32  NumPrimitives,
uint32  NumInstances 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIDrawPrimitiveIndirect()

void FD3D12CommandContext::RHIDrawPrimitiveIndirect ( FRHIBuffer ArgumentBuffer,
uint32  ArgumentOffset 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIEndRenderPass()

virtual void FD3D12CommandContext::RHIEndRenderPass ( )
inlinevirtual

Implements IRHICommandContext.

◆ RHIEndRenderQuery()

void FD3D12CommandContext::RHIEndRenderQuery ( FRHIRenderQuery RenderQuery)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHIEndTransitions()

void FD3D12CommandContext::RHIEndTransitions ( TArrayView< const FRHITransition * >  Transitions)
finaloverridevirtual

Implements IRHIComputeContext.

◆ RHIMultiDrawIndexedPrimitiveIndirect()

void FD3D12CommandContext::RHIMultiDrawIndexedPrimitiveIndirect ( FRHIBuffer IndexBuffer,
FRHIBuffer ArgumentBuffer,
uint32  ArgumentOffset,
FRHIBuffer CountBuffer,
uint32  CountBuffeOffset,
uint32  MaxDrawArguments 
)
finaloverridevirtual

Similar to RHIDrawIndexedPrimitiveIndirect, but allows many draw arguments to be provided at once. GRHIGlobals.SupportsDrawIndirect must be checked to detect support on the current machine. @ param IndexBuffer Buffer containing primitive indices @ param ArgumentsBuffer Buffer containing FRHIDrawIndexedIndirectParameters structures @ param ArgumentOffset Offset in bytes of the first element in ArgumentsBuffer that will be used for drawing @ param CountBuffer Buffer containing uint32 count of valid draw arguments that should be consumed (may be nullptr, indicating that only MaxDrawArguments value should be used) @ param CountBuffeOffset Offset in bytes for the CountBuffer element that will be used to source the draw argument count @ param MaxDrawArguments How many draw arguments should be processed at most, i.e. NumDrawArguments = min(MaxDrawArguments, ValueFromCountBuffer)

Reimplemented from IRHICommandContext.

◆ RHISetBlendFactor()

void FD3D12CommandContext::RHISetBlendFactor ( const FLinearColor BlendFactor)
finaloverridevirtual

Reimplemented from IRHICommandContext.

◆ RHISetComputePipelineState()

void FD3D12CommandContext::RHISetComputePipelineState ( FRHIComputePipelineState ComputePipelineState)
finaloverridevirtual

Implements IRHIComputeContext.

◆ RHISetDepthBounds()

void FD3D12CommandContext::RHISetDepthBounds ( float  MinDepth,
float  MaxDepth 
)
finaloverridevirtual

Sets Depth Bounds range with the given min/max depth.

Parameters
MinDepthThe minimum depth for depth bounds test
MaxDepthThe maximum depth for depth bounds test. The valid values for fMinDepth and fMaxDepth are such that 0 <= fMinDepth <= fMaxDepth <= 1

Implements IRHICommandContext.

◆ RHISetGPUMask()

virtual void FD3D12CommandContext::RHISetGPUMask ( FRHIGPUMask  InGPUMask)
inlinefinaloverridevirtual

Reimplemented from IRHIComputeContext.

◆ RHISetGraphicsPipelineState()

void FD3D12CommandContext::RHISetGraphicsPipelineState ( FRHIGraphicsPipelineState GraphicsPipelineState,
uint32  StencilRef,
bool  bApplyAdditionalState 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHISetMultipleViewports()

void FD3D12CommandContext::RHISetMultipleViewports ( uint32  Count,
const FViewportBounds Data 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHISetScissorRect()

void FD3D12CommandContext::RHISetScissorRect ( bool  bEnable,
uint32  MinX,
uint32  MinY,
uint32  MaxX,
uint32  MaxY 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHISetShaderParameters() [1/2]

virtual void FD3D12CommandContext::RHISetShaderParameters ( FRHIComputeShader Shader,
TConstArrayView< uint8 InParametersData,
TConstArrayView< FRHIShaderParameter InParameters,
TConstArrayView< FRHIShaderParameterResource InResourceParameters,
TConstArrayView< FRHIShaderParameterResource InBindlessParameters 
)
finaloverridevirtual

Implements IRHIComputeContext.

◆ RHISetShaderParameters() [2/2]

virtual void FD3D12CommandContext::RHISetShaderParameters ( FRHIGraphicsShader Shader,
TConstArrayView< uint8 InParametersData,
TConstArrayView< FRHIShaderParameter InParameters,
TConstArrayView< FRHIShaderParameterResource InResourceParameters,
TConstArrayView< FRHIShaderParameterResource InBindlessParameters 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHISetShaderRootConstants()

void FD3D12CommandContext::RHISetShaderRootConstants ( const FUint32Vector4 Constants)
overridevirtual

Reimplemented from IRHIComputeContext.

◆ RHISetShaderUnbinds() [1/2]

void FD3D12CommandContext::RHISetShaderUnbinds ( FRHIComputeShader Shader,
TConstArrayView< FRHIShaderParameterUnbind InUnbinds 
)
finaloverridevirtual

Reimplemented from IRHIComputeContext.

◆ RHISetShaderUnbinds() [2/2]

void FD3D12CommandContext::RHISetShaderUnbinds ( FRHIGraphicsShader Shader,
TConstArrayView< FRHIShaderParameterUnbind InUnbinds 
)
finaloverridevirtual

Reimplemented from IRHICommandContext.

◆ RHISetShadingRate()

void FD3D12CommandContext::RHISetShadingRate ( EVRSShadingRate  ShadingRate,
EVRSRateCombiner  Combiner 
)
finaloverridevirtual

Reimplemented from IRHICommandContext.

◆ RHISetStaticUniformBuffer()

void FD3D12CommandContext::RHISetStaticUniformBuffer ( FUniformBufferStaticSlot  Slot,
FRHIUniformBuffer Buffer 
)
finaloverridevirtual

Implements IRHIComputeContext.

◆ RHISetStaticUniformBuffers()

void FD3D12CommandContext::RHISetStaticUniformBuffers ( const FUniformBufferStaticBindings InUniformBuffers)
finaloverridevirtual

Implements IRHIComputeContext.

◆ RHISetStencilRef()

void FD3D12CommandContext::RHISetStencilRef ( uint32  StencilRef)
finaloverridevirtual

Reimplemented from IRHICommandContext.

◆ RHISetStereoViewport()

void FD3D12CommandContext::RHISetStereoViewport ( float  LeftMinX,
float  RightMinX,
float  LeftMinY,
float  RightMinY,
float  MinZ,
float  LeftMaxX,
float  RightMaxX,
float  LeftMaxY,
float  RightMaxY,
float  MaxZ 
)
overridevirtual

Reimplemented from IRHICommandContext.

◆ RHISetStreamSource()

void FD3D12CommandContext::RHISetStreamSource ( uint32  StreamIndex,
FRHIBuffer VertexBuffer,
uint32  Offset 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ RHISetViewport()

void FD3D12CommandContext::RHISetViewport ( float  MinX,
float  MinY,
float  MinZ,
float  MaxX,
float  MaxY,
float  MaxZ 
)
finaloverridevirtual

Implements IRHICommandContext.

◆ SetAsyncComputeBudgetInternal()

virtual void FD3D12CommandContext::SetAsyncComputeBudgetInternal ( EAsyncComputeBudget  Budget)
inlinevirtual

◆ SetDepthBounds()

void FD3D12CommandContext::SetDepthBounds ( float  MinDepth,
float  MaxDepth 
)
virtual

◆ SetExplicitDescriptorCache()

void FD3D12CommandContext::SetExplicitDescriptorCache ( FD3D12ExplicitDescriptorCache ExplicitDescriptorCache)

◆ SetRenderTargets()

void FD3D12CommandContext::SetRenderTargets ( uint32  NumSimultaneousRenderTargets,
const FRHIRenderTargetView NewRenderTargets,
const FRHIDepthRenderTargetView NewDepthStencilTarget 
)

◆ SetRenderTargetsAndClear()

void FD3D12CommandContext::SetRenderTargetsAndClear ( const FRHISetRenderTargetsInfo RenderTargetsInfo)

◆ SetResourcesFromTables() [1/2]

template<class ShaderType >
void FD3D12CommandContext::SetResourcesFromTables ( const ShaderType *RESTRICT  Shader)

◆ SetResourcesFromTables() [2/2]

template<class ShaderType >
void FD3D12CommandContext::SetResourcesFromTables ( const ShaderType *  RESTRICT)

◆ SetShadingRate()

void FD3D12CommandContext::SetShadingRate ( EVRSShadingRate  ShadingRate,
FD3D12Resource ShadingRateImage,
const TStaticArray< EVRSRateCombiner, ED3D12VRSCombinerStages::Num > &  Combiners 
)
virtual

◆ SetSRVParameter()

void FD3D12CommandContext::SetSRVParameter ( EShaderFrequency  Frequency,
uint32  SRVIndex,
FD3D12ShaderResourceView SRV 
)

◆ SetUAVParameter() [1/2]

void FD3D12CommandContext::SetUAVParameter ( EShaderFrequency  Frequency,
uint32  UAVIndex,
FD3D12UnorderedAccessView UAV 
)

◆ SetUAVParameter() [2/2]

void FD3D12CommandContext::SetUAVParameter ( EShaderFrequency  Frequency,
uint32  UAVIndex,
FD3D12UnorderedAccessView UAV,
uint32  InitialCount 
)

◆ UnsetExplicitDescriptorCache()

void FD3D12CommandContext::UnsetExplicitDescriptorCache ( )

Member Data Documentation

◆ bDiscardSharedComputeConstants

bool FD3D12CommandContext::bDiscardSharedComputeConstants = false

When a new compute PSO is set, we discard all old constants set for the previous shader.

◆ bDiscardSharedGraphicsConstants

bool FD3D12CommandContext::bDiscardSharedGraphicsConstants = false

When a new graphics PSO is set, we discard all old constants set for the previous shader.

◆ BoundUniformBuffers

FD3D12UniformBuffer* FD3D12CommandContext::BoundUniformBuffers[SF_NumStandardFrequencies][MAX_CBS] = {}

Track the currently bound uniform buffers.

◆ bOuterOcclusionQuerySubmitted

bool FD3D12CommandContext::bOuterOcclusionQuerySubmitted = false

◆ ConstantsAllocator

FD3D12FastConstantAllocator FD3D12CommandContext::ConstantsAllocator

◆ DirtyUniformBuffers

uint16 FD3D12CommandContext::DirtyUniformBuffers[SF_NumStandardFrequencies] = {}

Bit array to track which uniform buffers have changed since the last draw call.

◆ GPUEventStack

TArray<uint32> FD3D12CommandContext::GPUEventStack

◆ OuterOcclusionQuery

FRenderQueryRHIRef FD3D12CommandContext::OuterOcclusionQuery

Handle for the dummy outer occlusion query we optionally insert for performance reasons

◆ StageConstantBuffers

FD3D12ConstantBuffer FD3D12CommandContext::StageConstantBuffers[SF_NumStandardFrequencies]

Used by variable rate shading to cache the current state of the combiners and the constant shading rate Constant buffers for Set*ShaderParameter calls.

◆ StateCache

FD3D12StateCache FD3D12CommandContext::StateCache

The documentation for this class was generated from the following files: