Navigation
API > API/Runtime > API/Runtime/VulkanRHI
Inheritance Hierarchy
- FDynamicRHI
- IVulkanDynamicRHI
- FVulkanDynamicRHI
References
| Module | VulkanRHI |
| Header | /Engine/Source/Runtime/VulkanRHI/Public/VulkanDynamicRHI.h |
| Include | #include "VulkanDynamicRHI.h" |
Syntax
class FVulkanDynamicRHI : public IVulkanDynamicRHI
Remarks
The interface which is implemented by the dynamically bound RHI.
Variables
| Type | Name | Description | |
|---|---|---|---|
| EActiveDebugLayerExtension | ActiveDebugLayerExtension | ||
| uint32 | ApiVersion | ||
| bool | bIsStandaloneStereoDevice | ||
| FVulkanDevice * | Device | ||
| TRefCountPtr< FVulkanViewport > | DrawingViewport | The viewport which is currently being drawn. | |
| VkInstance | Instance | ||
| TArray< const ANSICHAR * > | InstanceExtensions | ||
| TArray< const ANSICHAR * > | InstanceLayers | ||
| FCriticalSection | LockBufferCS | ||
| FOptionalVulkanInstanceExtensions | OptionalInstanceExtensions | ||
| IConsoleObject * | RebuildPipelineCacheCmd | ||
| IConsoleObject * | SavePipelineCacheCmd | ||
| uint32 | TotalPresentCount | Historical number of times we've presented any and all viewports. | |
| TArray< FVulkanViewport * > | Viewports | A list of all viewport RHIs that have been created. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Initialization constructor. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | |||
| FVulkanDynamicRHI & | Get () |
||
| uint32 | |||
| FVulkanDevice * | GetDevice () |
||
| VkInstance | GetInstance () |
||
| const TArray< const ANSICHAR * > & | |||
| const TArray< const ANSICHAR * > & | |||
| const FOptionalVulkanInstanceExtensions & | |||
| TArray< FVulkanViewport * > & | GetViewports () |
||
| void | InitDevice
(
FVulkanDevice* Device |
||
| void | InitGPU
(
FVulkanDevice* Device |
||
| void | InitInstance () |
||
| void | InternalUnlockTexture2D
(
bool bFromRenderingThread, |
||
| void | InternalUpdateTexture2D
(
FRHICommandListBase& RHICmdList, |
||
| void | InternalUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
||
| void | |||
| void | RecreateSwapChain
(
void* NewNativeWindow |
||
| void | |||
| void | SelectDevice () |
||
| TArray< const ANSICHAR * > | SetupInstanceLayers
(
FVulkanInstanceExtensionArray& UEExtensions |
Static void WriteEndFrameTimestamp(void*); | |
| void | |||
| bool | |||
| void | UpdateUniformBuffer
(
FRHICommandListBase& RHICmdList, |
||
| void | VulkanSetImageLayout
(
VkCommandBuffer CmdBuffer, |
Overridden from IVulkanDynamicRHI
| Type | Name | Description | |
|---|---|---|---|
| FTexture2DArrayRHIRef | RHICreateTexture2DArrayFromResource
(
EPixelFormat Format, |
||
| FTexture2DRHIRef | RHICreateTexture2DFromResource
(
EPixelFormat Format, |
||
| FTextureCubeRHIRef | RHICreateTextureCubeFromResource
(
EPixelFormat Format, |
||
| bool | RHIDoesAdapterMatchDevice
(
const void* InAdapterId |
||
| void | RHIFinishExternalComputeWork
(
VkCommandBuffer InCommandBuffer |
||
| VkCommandBuffer | |||
| TArray< VkExtensionProperties > | RHIGetAllDeviceExtensions
(
VkPhysicalDevice InPhysicalDevice |
||
| TArray< VkExtensionProperties > | |||
| FVulkanRHIAllocationInfo | RHIGetAllocationInfo
(
FRHITexture* InTexture |
||
| uint64 | RHIGetGraphicsAdapterLUID
(
VkPhysicalDevice InPhysicalDevice |
||
| uint32 | |||
| uint32 | |||
| VkQueue | |||
| FVulkanRHIImageViewInfo | RHIGetImageViewInfo
(
FRHITexture* InTexture |
||
| VkFormat | RHIGetSwapChainVkFormat
(
EPixelFormat InFormat |
||
| VkFormat | RHIGetViewVkFormat
(
FRHITexture* InTexture |
||
| const VkAllocationCallbacks * | |||
| VkDevice | |||
| void * | RHIGetVkDeviceProcAddr
(
const char* InName |
||
| VkImage | RHIGetVkImage
(
FRHITexture* InTexture |
||
| VkInstance | |||
| VkPhysicalDevice | |||
| const uint8 * | |||
| uint32 | |||
| void | RHIRegisterWork
(
uint32 NumPrimitives |
||
| void | RHISetImageLayout
(
VkImage Image, |
||
| void | RHISetUploadImageLayout
(
VkImage Image, |
||
| void | |||
| bool | |||
| void | RHIVerifyResult
(
VkResult Result, |
Overridden from FDynamicRHI
| Type | Name | Description | |
|---|---|---|---|
| FTexture2DRHIRef | AsyncReallocateTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| ETextureReallocationStatus | FinalizeAsyncReallocateTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| const TCHAR * | GetName () |
||
| void | Init () |
Initializes the RHI; separate from IDynamicRHIModule::CreateRHI so that GDynamicRHI is set when it is called. | |
| void * | LockBuffer_BottomOfPipe
(
FRHICommandListBase& RHICmdList, |
Buffer Lock/Unlock. | |
| void * | LockTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | PostInit () |
Called after the RHI is initialized; before the render thread is started. | |
| void | FlushType: Flush RHI Thread. | ||
| void | RHIAdvanceFrameForGetViewportBackBuffer
(
FRHIViewport* Viewport |
Only relevant with an RHI thread, this advances the backbuffer for the purpose of GetViewportBackBuffer FlushType: Thread safe | |
| void | RHIAliasTextureResources
(
FTextureRHIRef& DestTexture, |
||
| FTextureRHIRef | RHIAsyncCreateTexture2D
(
uint32 SizeX, |
FlushType: Thread safe. | |
| FTexture2DRHIRef | RHIAsyncReallocateTexture2D
(
FRHITexture2D* Texture2D, |
Starts an asynchronous texture reallocation. | |
| FUpdateTexture3DData | RHIBeginUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIBindDebugLabelName
(
FRHIUnorderedAccessView* UnorderedAccessViewRHI, |
||
| void | RHIBindDebugLabelName
(
FRHITexture* Texture, |
FlushType: Thread safe. | |
| void | Blocks the CPU until the GPU catches up and goes idle. FlushType: Flush Immediate (seems wrong) | ||
| FRHICalcTextureSizeResult | RHICalcTexturePlatformSize
(
FRHITextureDesc const& Desc, |
FlushType: Thread safe. | |
| void | |||
| ETextureReallocationStatus | RHICancelAsyncReallocateTexture2D
(
FRHITexture2D* Texture2D, |
FlushType: Wait RHI Thread. | |
| uint32 | RHIComputeMemorySize
(
FRHITexture* TextureRHI |
FlushType: Thread safe. | |
| uint64 | RHIComputePrecachePSOHash
(
const FGraphicsPipelineStateInitializer& Initializer |
Compute the hash of the PSO initializer for PSO Precaching (only hash data relevant for the RHI specific PSO) | |
| void | RHICopyBuffer
(
FRHIBuffer* SourceBuffer, |
FlushType: Flush Immediate (seems dangerous) | |
| FTextureRHIRef | RHICreateAliasedTexture
(
FTextureRHIRef& SourceTexture |
||
| FBlendStateRHIRef | RHICreateBlendState
(
const FBlendStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FBoundShaderStateRHIRef | RHICreateBoundShaderState
(
FRHIVertexDeclaration* VertexDeclaration, |
FlushType: Thread safe, but varies depending on the RHI. | |
| FBufferRHIRef | RHICreateBuffer
(
FRHICommandListBase& RHICmdList, |
||
| FComputePipelineStateRHIRef | RHICreateComputePipelineState
(
FRHIComputeShader* ComputeShader |
FlushType: Thread safe. | |
| FComputeShaderRHIRef | RHICreateComputeShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FDepthStencilStateRHIRef | RHICreateDepthStencilState
(
const FDepthStencilStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FGeometryShaderRHIRef | RHICreateGeometryShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FGPUFenceRHIRef | RHICreateGPUFence
(
const FName& Name |
||
| FGraphicsPipelineStateRHIRef | RHICreateGraphicsPipelineState
(
const FGraphicsPipelineStateInitializer& Initializer |
FlushType: Thread safe. | |
| FPixelShaderRHIRef | RHICreatePixelShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FRasterizerStateRHIRef | RHICreateRasterizerState
(
const FRasterizerStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FRenderQueryRHIRef | RHICreateRenderQuery
(
ERenderQueryType QueryType |
FlushType: Wait RHI Thread. | |
| FSamplerStateRHIRef | RHICreateSamplerState
(
const FSamplerStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FShaderResourceViewRHIRef | RHICreateShaderResourceView
(
FRHICommandListBase& RHICmdList, |
SRV / UAV creation functions. | |
| FStagingBufferRHIRef | FlushType: Thread safe. | ||
| FTextureRHIRef | RHICreateTexture
(
const FRHITextureCreateDesc& CreateDesc |
Creates an RHI texture resource. | |
| FTextureRHIRef | RHICreateTexture_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| IRHITransientResourceAllocator * | Transient Resource Functions and Helpers. | ||
| void | RHICreateTransition
(
FRHITransition* Transition, |
||
| FUniformBufferRHIRef | RHICreateUniformBuffer
(
const void* Contents, |
FlushType: Thread safe, but varies depending on the RHI. | |
| FUnorderedAccessViewRHIRef | RHICreateUnorderedAccessView
(
FRHICommandListBase& RHICmdList, |
||
| FVertexDeclarationRHIRef | RHICreateVertexDeclaration
(
const FVertexDeclarationElementList& Elements |
FlushType: Wait RHI Thread. | |
| FVertexShaderRHIRef | RHICreateVertexShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FViewportRHIRef | RHICreateViewport
(
void* WindowHandle, |
Must be called from the main thread. FlushType: Thread safe | |
| void | RHIEndUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
||
| ETextureReallocationStatus | RHIFinalizeAsyncReallocateTexture2D
(
FRHITexture2D* Texture2D, |
FlushType: Wait RHI Thread. | |
| IRHIPlatformCommandList * | RHIFinalizeContext
(
IRHIComputeContext* Context |
Finalizes (i.e. closes) the specified command context, returning the completed platform command list object. | |
| void | Flush driver resources. | ||
| bool | RHIGetAvailableResolutions
(
FScreenResolutionArray& Resolutions, |
FlushType: Thread safe. | |
| IRHIComputeContext * | RHIGetCommandContext
(
ERHIPipeline Pipeline, |
Retrieves a new command context to begin the recording of a new platform command list. | |
| IRHIComputeContext * | FlushType: Thread safe. | ||
| IRHICommandContext * | FlushType: Thread safe. | ||
| uint32 | RHIGetGPUFrameCycles
(
uint32 GPUIndex |
FlushType: Thread safe. | |
| uint64 | RHIGetMinimumAlignmentForBufferBackedSRV
(
EPixelFormat Format |
FlushType: Thread safe. | |
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| bool | RHIGetRenderQueryResult
(
FRHIRenderQuery* RenderQuery, |
CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread. | |
| void | RHIGetSupportedResolution
(
uint32& Width, |
FlushType: Thread safe. | |
| void | RHIGetTextureMemoryStats
(
FTextureMemoryStats& OutStats |
FlushType: Thread safe. | |
| bool | RHIGetTextureMemoryVisualizeData
(
FColor* TextureData, |
FlushType: Flush Immediate. | |
| FTexture2DRHIRef | RHIGetViewportBackBuffer
(
FRHIViewport* Viewport |
With RHI thread, this is the current backbuffer from the perspective of the render thread. | |
| bool | FlushType: Flush Immediate. | ||
| void * | RHILockStagingBuffer
(
FRHIStagingBuffer* StagingBuffer, |
Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. | |
| void * | RHILockTexture2D
(
FRHITexture2D* Texture, |
FlushType: Flush RHI Thread. | |
| void * | RHILockTexture2DArray
(
FRHITexture2DArray* Texture, |
FlushType: Flush RHI Thread. | |
| void * | RHILockTextureCubeFace
(
FRHITextureCube* Texture, |
FlushType: Flush RHI Thread. | |
| void | RHIMapStagingSurface
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| bool | RHIMatchPrecachePSOInitializers
(
const FGraphicsPipelineStateInitializer& LHS, |
Check if PSO Initializers are the same used during PSO Precaching (only compare data relevant for the RHI specific PSO) | |
| void | RHIRead3DSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIReadSurfaceData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIReadSurfaceData
(
FRHITexture* Texture, |
Default fallback; will not work for non-8-bit surfaces and it's extremely slow. | |
| void | RHIReadSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | FlushType: Flush RHI Thread. | ||
| void | RHIReleaseTransition
(
FRHITransition* Transition |
||
| bool | |||
| void | RHIResizeViewport
(
FRHIViewport* Viewport, |
||
| void | RHIResizeViewport
(
FRHIViewport* Viewport, |
Must be called from the main thread. FlushType: Thread safe | |
| void | FlushType: Thread safe. | ||
| void | RHISubmitCommandLists
(
TArrayView< IRHIPlatformCommandList* > CommandLists, |
Submits a batch of previously recorded/finalized command lists to the GPU. | |
| void | Kicks the current frame and makes sure GPU is actively working on them FlushType: Flush Immediate (copied from RHIBlockUntilGPUIdle) | ||
| void | Operations to suspend title rendering and yield control to the system FlushType: Thread safe | ||
| void | RHITick
(
float DeltaTime |
Must be called from the main thread. FlushType: Thread safe | |
| void | RHITransferBufferUnderlyingResource
(
FRHIBuffer* DestBuffer, |
Transfer metadata and underlying resource from src to dest and release any resource owned by dest. | |
| void | RHIUnlockBuffer
(
FRHICommandListBase& RHICmdList, |
FlushType: Flush RHI Thread. | |
| void | RHIUnlockStagingBuffer
(
FRHIStagingBuffer* StagingBuffer |
Unlock a staging buffer previously locked with RHILockStagingBuffer. | |
| void | RHIUnlockTexture2D
(
FRHITexture2D* Texture, |
FlushType: Flush RHI Thread. | |
| void | RHIUnlockTexture2DArray
(
FRHITexture2DArray* Texture, |
FlushType: Flush RHI Thread. | |
| void | RHIUnlockTextureCubeFace
(
FRHITextureCube* Texture, |
FlushType: Flush RHI Thread. | |
| void | RHIUnmapStagingSurface
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIUpdateTexture2D
(
FRHICommandListBase& RHICmdList, |
Updates a region of a 2D texture from system memory | |
| void | RHIUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
Updates a region of a 3D texture from system memory | |
| void | RHIUpdateTextureReference
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIUpdateUniformBuffer
(
FRHICommandListBase& RHICmdList, |
||
| void | Shutdown () |
Shutdown the RHI; handle shutdown and resource destruction before the RHI's actual destructor is called (so that all resources of the RHI are still available for shutdown). | |
| void | UnlockBuffer_BottomOfPipe
(
FRHICommandListBase& RHICmdList, |
||
| void | UnlockTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EActiveDebugLayerExtension |
Constants
| Name | Description |
|---|---|
| HMDVulkanExtensions |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| VkImageLayout & | RHIFindOrAddLayoutRW
(
FRHITexture* InTexture, |
Altering image layout tracking directly is not permitted anymore. |