FVulkanCommandListContext

Inheritance Hierarchy

Syntax

class FVulkanCommandListContext : public IRHICommandContext

Variables

Name Description

Protected variable

bool

 

bAutomaticFlushAfterComputeShader

Protected variable

bool

 

bSubmitAtNextSafePoint

Protected variable

FVulkanCommandB...

 

CommandBufferManager

Protected variable

FVulkanOcclusio ...

 

CurrentOcclusionQueryPool

Protected variable

FVulkanDevice &...

 

Device

Protected variable

TArray < FString ...

 

EventStack

Public variable

void *

 

Hotfix

Protected variable

FVulkanCommandL ...

 

Immediate

Public variable

VulkanRHI::FTem ...

 

IndexAllocInfo

Public variable

uint32

 

IndexDataStride

Public variable

VkIndexType

 

IndexType

Public variable

uint32

 

MinVertexIndex

Public variable

uint32

 

NumPrimitives

Public variable

uint32

 

NumVertices

Protected variable

FVulkanPendingC...

 

PendingComputeState

Protected variable

FVulkanPendingG...

 

PendingGfxState

Protected variable

TArray < FPendin ...

 

PendingPixelUAVs

Protected variable

FVulkanQueue &#...

 

Queue

Protected variable

FVulkanDynamicR ...

 

RHI

Protected variable

VulkanRHI::FTem ...

 

TempFrameAllocationBuffer

Protected variable

FTransitionAndL ...

 

TransitionAndLayoutManager

Protected variable

FVulkanUniformB ...

 

UniformBufferUploader

Protected variable

FVulkanCommandL...

 

UserPrimitive

Public variable

VulkanRHI::FTem ...

 

VertexAllocInfo

Public variable

uint32

 

VertexDataStride

Constructors

Name Description

Public function

FVulkanCommandListContext

(
    FVulkanDynamicRHI * InRHI,
    FVulkanDevice* InDevice,
    FVulkanQueue* InQueue,
    FVulkanCommandListContext * InI...
)

Destructors

Name Description

Public function Virtual

~FVulkanCommandListContext()

Functions

Name Description

Protected function

void

 

BeginOcclusionQueryBatch

(
    FVulkanCmdBuffer* CmdBuffer,
    uint32 NumQueriesInBatch
)

Protected function

void

 

EndOcclusionQueryBatch

(
    FVulkanCmdBuffer* CmdBuffer
)

Public function

void

 

EndRenderQueryInternal

(
    FVulkanCmdBuffer* CmdBuffer,
    FVulkanRenderQuery * Query
)

Public function

VkImageLayou...

 

FindLayout

(
    VkImage Image
)

Public function

VkImageLayou...

 

FindOrAddLayout

(
    VkImage Image,
    VkImageLayout NewLayout
)

Public function

VkImageLayou...

 

FindOrAddLayoutRW

(
    VkImage Image,
    VkImageLayout NewLayout
)

Public function

FVulkanComma...

 

GetCommandBufferManager()

Public function

FVulkanRende...

 

GetCurrentRenderPass()

Public function Const

FVulkanDevic...

 

GetDevice()

Public function Const

uint64

 

GetFrameCounter()

Public function

FVulkanGPUPr ...

 

GetGPUProfiler()

Public function Const

VkImageLayou...

 

GetLayoutForDescriptor

(
    const FVulkanSurface & Surface
)

Public function

FVulkanPendi...

 

GetPendingComputeState()

Public function

FVulkanPendi...

 

GetPendingGfxState()

Public function

FVulkanQueue...

 

GetQueue()

Public function

VulkanRHI::F ...

 

GetTempFrameAllocationBuffer()

Public function

FTransitionA ...

 

GetTransitionAndLayoutManager()

Public function

FVulkanUnifo ...

 

GetUniformBufferUploader()

Protected function

void

 

InternalClearMRT

(
    FVulkanCmdBuffer* CmdBuffer,
    bool bClearColor,
    int32 NumClearColors,
    const FLinearColor * ColorArray,
    bool bClearDepth,
    float Depth,
    bool bClearStencil,
    uint32 Stencil
)

Public function Const

bool

 

IsImmediate()

Public function

void

 

NotifyDeletedImage

(
    VkImage Image
)

Public function

void

 

NotifyDeletedRenderTarget

(
    VkImage Image
)

Protected function

void

 

PrepareForCPURead()

Public function

void

 

PrepareParallelFromBase

(
    const FVulkanCommandListContext & B...
)

Public function

FVulkanRende...

 

PrepareRenderPassForPSOCreation

(
    const FGraphicsPipelineStateInitial ...,
    const TArray < FInputAttachmentData ...
)

Public function

FVulkanRende...

 

PrepareRenderPassForPSOCreation

(
    const FVulkanRenderTargetLayout& I...
)

Public function

void

 

ReadAndCalculateGPUFrameTime()

Protected function

void

 

RequestSubmitCurrentCommands()

Protected function

void

 

SetShaderUniformBuffer

(
    ShaderStage::EStage Stage,
    const FVulkanUniformBuffer * Un...,
    int32 ParameterIndex,
    const FVulkanShader * Shader
)

Protected function

void

 

TransitionResources

(
    const FPendingTransition & PendingT...
)

Protected function Static

void

 

TransitionUAVResourcesTransferringOwnership

(
    FVulkanCommandListContext & GfxCont...,
    FVulkanCommandListContext & Compute...,
    EResourceTransitionPipeline Pipelin...,
    const TArray < VkBufferMemoryBarrier...,
    const TArray < VkImageMemoryBarrier ...
)

Public function

void

 

WriteBeginTimestamp

(
    FVulkanCmdBuffer* CmdBuffer
)

Public function

void

 

WriteEndTimestamp

(
    FVulkanCmdBuffer* CmdBuffer
)

Overridden from IRHICommandContext

Name Description

Public function Virtual

void

 

RHIAutomaticCacheFlushAfterComputeShader

(
    bool bEnable
)

Public function Virtual

void

 

RHIBeginDrawIndexedPrimitiveUP

(
    uint32 NumPrimitives,
    uint32 NumVertices,
    uint32 VertexDataStride,
    void*& OutVertexData,
    uint32 MinVertexIndex,
    uint32 NumIndices,
    uint32 IndexDataStride,
    void*& OutIndexData
)

Preallocate memory or get a direct command stream pointer to fill up for immediate rendering .

Public function Virtual

void

 

RHIBeginDrawingViewport

(
    FViewportRHIParamRef Viewport,
    FTextureRHIParamRef RenderTargetRHI
)

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIBeginDrawPrimitiveUP

(
    uint32 NumPrimitives,
    uint32 NumVertices,
    uint32 VertexDataStride,
    void*& OutVertexData
)

Preallocate memory or get a direct command stream pointer to fill up for immediate rendering .

Public function Virtual

void

 

RHIBeginFrame()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIBeginRenderPass

(
    const FRHIRenderPassInfo & InInfo,
    const TCHAR * InName
)

Public function Virtual

void

 

RHIBeginRenderQuery

(
    FRenderQueryRHIParamRef RenderQuery
)

Render time measurement.

Public function Virtual

void

 

RHIBeginScene()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIClearTinyUAV

(
    FUnorderedAccessViewRHIParamRef Uno...,
    const uint32 * Values
)

Clears a UAV to the multi-component value provided.

Public function Virtual

void

 

RHICopyTexture

(
    FTextureRHIParamRef SourceTexture,
    FTextureRHIParamRef DestTexture,
    const FRHICopyTextureInfo & CopyInf...
)

Public function Virtual

void

 

RHICopyToResolveTarget

(
    FTextureRHIParamRef SourceTexture,
    FTextureRHIParamRef DestTexture,
    const FResolveParams & ResolveParam...
)

Resolves from one texture to another.

Public function Virtual

void

 

RHIDrawIndexedIndirect

(
    FIndexBufferRHIParamRef IndexBuffer...,
    FStructuredBufferRHIParamRef Argume...,
    int32 DrawArgumentsIndex,
    uint32 NumInstances
)

Public function Virtual

void

 

RHIDrawIndexedPrimitive

(
    FIndexBufferRHIParamRef IndexBuffer,
    int32 BaseVertexIndex,
    uint32 FirstInstance,
    uint32 NumVertices,
    uint32 StartIndex,
    uint32 NumPrimitives,
    uint32 NumInstances
)

Public function Virtual

void

 

RHIDrawIndexedPrimitiveIndirect

(
    FIndexBufferRHIParamRef IndexBuffer,
    FVertexBufferRHIParamRef ArgumentBu...,
    uint32 ArgumentOffset
)

Public function Virtual

void

 

RHIDrawPrimitive

(
    uint32 BaseVertexIndex,
    uint32 NumPrimitives,
    uint32 NumInstances
)

Public function Virtual

void

 

RHIDrawPrimitiveIndirect

(
    FVertexBufferRHIParamRef ArgumentBu...,
    uint32 ArgumentOffset
)

Public function Virtual

void

 

RHIEndDrawIndexedPrimitiveUP()

Draw a primitive using the vertex and index data populated since RHIBeginDrawIndexedPrimitiveUP and clean up any memory as needed

Public function Virtual

void

 

RHIEndDrawingViewport

(
    FViewportRHIParamRef Viewport,
    bool bPresent,
    bool bLockToVsync
)

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIEndDrawPrimitiveUP()

Draw a primitive using the vertex data populated since RHIBeginDrawPrimitiveUP and clean up any memory as needed

Public function Virtual

void

 

RHIEndFrame()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIEndRenderPass()

Public function Virtual

void

 

RHIEndRenderQuery

(
    FRenderQueryRHIParamRef RenderQuery
)

Public function Virtual

void

 

RHIEndScene()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIFlushComputeShaderCache()

Public function Virtual

void

 

RHISetDepthBounds

(
    float MinDepth,
    float MaxDepth
)

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

Public function Virtual

void

 

RHISetGraphicsPipelineState

Public function Virtual

void

 

RHISetMultipleViewports

(
    uint32 Count,
    const FViewportBounds * Data
)

Useful when used with geometry shader (emit polygons to different viewports), otherwise SetViewPort() is simpler

Public function Virtual

void

 

RHISetRenderTargets

(
    uint32 NumSimultaneousRenderTargets,
    const FRHIRenderTargetView * Ne...,
    const FRHIDepthRenderTargetView ...,
    uint32 NumUAVs,
    const FUnorderedAccessViewRHIParamR ...
)

Public function Virtual

void

 

RHISetRenderTargetsAndClear

(
    const FRHISetRenderTargetsInfo & Re...
)

Public function Virtual

void

 

RHISetScissorRect

(
    bool bEnable,
    uint32 MinX,
    uint32 MinY,
    uint32 MaxX,
    uint32 MaxY
)

Public function Virtual

void

 

RHISetShaderParameter

(
    FHullShaderRHIParamRef HullShader,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function Virtual

void

 

RHISetShaderParameter

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function Virtual

void

 

RHISetShaderParameter

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function Virtual

void

 

RHISetShaderParameter

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function Virtual

void

 

RHISetShaderParameter

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function Virtual

void

 

RHISetShaderResourceViewParameter

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function Virtual

void

 

RHISetShaderResourceViewParameter

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function Virtual

void

 

RHISetShaderResourceViewParameter

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function Virtual

void

 

RHISetShaderResourceViewParameter

(
    FHullShaderRHIParamRef HullShader,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function Virtual

void

 

RHISetShaderResourceViewParameter

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function Virtual

void

 

RHISetShaderSampler

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function Virtual

void

 

RHISetShaderSampler

(
    FHullShaderRHIParamRef HullShader,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function Virtual

void

 

RHISetShaderSampler

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function Virtual

void

 

RHISetShaderSampler

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function Virtual

void

 

RHISetShaderSampler

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function Virtual

void

 

RHISetShaderTexture

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function Virtual

void

 

RHISetShaderTexture

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function Virtual

void

 

RHISetShaderTexture

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function Virtual

void

 

RHISetShaderTexture

(
    FHullShaderRHIParamRef HullShader,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function Virtual

void

 

RHISetShaderTexture

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function Virtual

void

 

RHISetShaderUniformBuffer

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function Virtual

void

 

RHISetShaderUniformBuffer

(
    FHullShaderRHIParamRef HullShader,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function Virtual

void

 

RHISetShaderUniformBuffer

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function Virtual

void

 

RHISetShaderUniformBuffer

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function Virtual

void

 

RHISetShaderUniformBuffer

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function Virtual

void

 

RHISetStencilRef

(
    uint32 StencilRef
)

Public function Virtual

void

 

RHISetStreamSource

(
    uint32 StreamIndex,
    FVertexBufferRHIParamRef VertexBuff...,
    uint32 Offset
)

Public function Virtual

void

 

RHISetViewport

(
    uint32 MinX,
    uint32 MinY,
    float MinZ,
    uint32 MaxX,
    uint32 MaxY,
    float MaxZ
)

Public function Virtual

void

 

RHITransitionResources

(
    EResourceTransitionAccess Transitio...,
    FTextureRHIParamRef * InTexture...,
    int32 NumTextures
)

Explicitly transition a texture resource from readable -> writable by the GPU or vice versa.

Public function Virtual

void

 

RHIUpdateTextureReference

(
    FTextureReferenceRHIParamRef Textur...,
    FTextureRHIParamRef NewTexture
)

Overridden from IRHIComputeContext

Name Description

Public function Virtual

void

 

RHICopyToStagingBuffer

(
    FVertexBufferRHIParamRef SourceBuff...,
    FStagingBufferRHIParamRef Destinati...,
    uint32 InOffset,
    uint32 InNumBytes,
    FGPUFenceRHIParamRef FenceRHI
)

Performs a copy of the data in 'SourceBuffer' to 'DestinationStagingBuffer.' This will occur inline on the GPU timeline.

Public function Virtual

void

 

RHIDispatchComputeShader

(
    uint32 ThreadGroupCountX,
    uint32 ThreadGroupCountY,
    uint32 ThreadGroupCountZ
)

Public function Virtual

void

 

RHIDispatchIndirectComputeShader

(
    FVertexBufferRHIParamRef ArgumentBu...,
    uint32 ArgumentOffset
)

Public function Virtual

void

 

RHIPopEvent()

Public function Virtual

void

 

RHIPushEvent

(
    const TCHAR * Name,
    FColor Color
)

Public function Virtual

void

 

RHISetComputePipelineState

(
    FRHIComputePipelineState * Comp...
)

Public function Virtual

void

 

RHISetComputeShader

(
    FComputeShaderRHIParamRef ComputeSh...
)

Sets the current compute shader.

Public function Virtual

void

 

RHISetShaderParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function Virtual

void

 

RHISetShaderResourceViewParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function Virtual

void

 

RHISetShaderSampler

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function Virtual

void

 

RHISetShaderTexture

(
    FComputeShaderRHIParamRef PixelShad...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function Virtual

void

 

RHISetShaderUniformBuffer

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function Virtual

void

 

RHISetUAVParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 UAVIndex,
    FUnorderedAccessViewRHIParamRef UAV,
    uint32 InitialCount
)

Sets a compute shader counted UAV parameter and initial count

Public function Virtual

void

 

RHISetUAVParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 UAVIndex,
    FUnorderedAccessViewRHIParamRef UAV
)

Sets a compute shader UAV parameter.

Public function Virtual

void

 

RHISubmitCommandsHint()

Submit the current command buffer to the GPU if possible.

Public function Virtual

void

 

RHITransitionResources

(
    EResourceTransitionAccess Transitio...,
    EResourceTransitionPipeline Transit...,
    FUnorderedAccessViewRHIParamRef ...,
    int32 NumUAVs,
    FComputeFenceRHIParamRef WriteCompu...
)

Explicitly transition a UAV from readable -> writable by the GPU or vice versa.

Public function Virtual

void

 

RHIWaitComputeFence

(
    FComputeFenceRHIParamRef InFence
)

Compute queue will wait for the fence to be written before continuing.

Classes

Name

Description

Protected struct

FPendingPixelUAV

List of UAVs which need setting for pixel shaders. D3D treats UAVs like rendertargets so the RHI doesn't make SetUAV calls at the right time.

Protected struct

FPendingTransition

References

Module

VulkanRHI

Header

Runtime/VulkanRHI/Public/VulkanContext.h