engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 属性 | 所有成员列表
FVulkanDynamicRHI类 参考

The interface which is implemented by the dynamically bound RHI. 更多...

#include <VulkanDynamicRHI.h>

+ 类 FVulkanDynamicRHI 继承关系图:

Public 成员函数

 FVulkanDynamicRHI ()
 Initialization constructor.
 
virtual void Init () final override
 Initializes the RHI; separate from IDynamicRHIModule::CreateRHI so that GDynamicRHI is set when it is called.
 
virtual void PostInit () final override
 Called after the RHI is initialized; before the render thread is started.
 
virtual FTexture2DRHIRef RHIAsyncCreateTexture2D (uint32 SizeX, uint32 SizeY, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, void **InitialMipData, uint32 NumInitialMips) final override
 Thread-safe function that can be used to create a texture outside of the rendering thread. 更多...
 
virtual FTexture2DRHIRef RHIAsyncReallocateTexture2D (FRHITexture2D *Texture2D, int32 NewMipCount, int32 NewSizeX, int32 NewSizeY, FThreadSafeCounter *RequestStatus) final override
 Starts an asynchronous texture reallocation. 更多...
 
virtual uint64 RHICalcTexture2DPlatformSize (uint32 SizeX, uint32 SizeY, uint8 Format, uint32 NumMips, uint32 NumSamples, ETextureCreateFlags Flags, const FRHIResourceCreateInfo &CreateInfo, uint32 &OutAlign) final override
 Computes the total size of a 2D texture with the specified parameters. 更多...
 
virtual uint64 RHICalcTexture3DPlatformSize (uint32 SizeX, uint32 SizeY, uint32 SizeZ, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, const FRHIResourceCreateInfo &CreateInfo, uint32 &OutAlign) final override
 Computes the total size of a 3D texture with the specified parameters. 更多...
 
virtual uint64 RHICalcTextureCubePlatformSize (uint32 Size, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, const FRHIResourceCreateInfo &CreateInfo, uint32 &OutAlign) final override
 Computes the total size of a cube texture with the specified parameters. 更多...
 
virtual ETextureReallocationStatus RHICancelAsyncReallocateTexture2D (FRHITexture2D *Texture2D, bool bBlockUntilCompleted) final override
 Cancels an async reallocation for the specified texture. 更多...
 
virtual uint32 RHIComputeMemorySize (FRHITexture *TextureRHI) final override
 Computes the size in memory required by a given texture. 更多...
 
virtual void RHICopySharedMips (FRHITexture2D *DestTexture2D, FRHITexture2D *SrcTexture2D) final override
 Copies shared mip levels from one texture to another. 更多...
 
virtual void RHICopyVertexBuffer (FRHIVertexBuffer *SourceBuffer, FRHIVertexBuffer *DestBuffer) final override
 Copies the contents of one vertex buffer to another vertex buffer. 更多...
 
virtual FBoundShaderStateRHIRef RHICreateBoundShaderState (FRHIVertexDeclaration *VertexDeclaration, FRHIVertexShader *VertexShader, FRHIHullShader *HullShader, FRHIDomainShader *DomainShader, FRHIPixelShader *PixelShader, FRHIGeometryShader *GeometryShader) final override
 Creates a bound shader state instance which encapsulates a decl, vertex shader, hull shader, domain shader and pixel shader CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread or the RHI thread. 更多...
 
virtual FGraphicsPipelineStateRHIRef RHICreateGraphicsPipelineState (const FGraphicsPipelineStateInitializer &Initializer) final override
 Creates a graphics pipeline state object (PSO) that represents a complete gpu pipeline for rendering. 更多...
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (const FShaderResourceViewInitializer &Initializer) final override
 Creates a shader resource view
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHIIndexBuffer *Buffer) final override
 Creates a shader resource view of the given index buffer.
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHIStructuredBuffer *StructuredBuffer) final override
 Creates a shader resource view of the given structured buffer.
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHITexture *Texture, const FRHITextureSRVCreateInfo &CreateInfo) final override
 Creates a shader resource view for a texture
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHIVertexBuffer *VertexBuffer, uint32 Stride, uint8 Format) final override
 Creates a shader resource view of the given vertex buffer.
 
virtual FStagingBufferRHIRef RHICreateStagingBuffer () final override
 Creates a staging buffer, which is memory visible to the cpu without any locking. 更多...
 
virtual FStructuredBufferRHIRef RHICreateStructuredBuffer (uint32 Stride, uint32 Size, uint32 InUsage, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo) final override
 
virtual FTexture2DRHIRef RHICreateTexture2D (uint32 SizeX, uint32 SizeY, uint8 Format, uint32 NumMips, uint32 NumSamples, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo) final override
 Creates a 2D RHI texture resource 更多...
 
virtual FTexture2DArrayRHIRef RHICreateTexture2DArray (uint32 SizeX, uint32 SizeY, uint32 SizeZ, uint8 Format, uint32 NumMips, uint32 NumSamples, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo) final override
 Creates a Array RHI texture resource 更多...
 
virtual FTexture3DRHIRef RHICreateTexture3D (uint32 SizeX, uint32 SizeY, uint32 SizeZ, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo) final override
 Creates a 3d RHI texture resource 更多...
 
virtual FTextureCubeRHIRef RHICreateTextureCube (uint32 Size, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo) final override
 Creates a Cube RHI texture resource 更多...
 
virtual FTextureCubeRHIRef RHICreateTextureCubeArray (uint32 Size, uint32 ArraySize, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo) final override
 Creates a Cube Array RHI texture resource 更多...
 
virtual FUniformBufferRHIRef RHICreateUniformBuffer (const void *Contents, const FRHIUniformBufferLayout &Layout, EUniformBufferUsage Usage, EUniformBufferValidation Validation) final override
 Creates a uniform buffer. 更多...
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHIIndexBuffer *IndexBuffer, uint8 Format) final override
 Creates an unordered access view of the given index buffer.
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHIStructuredBuffer *StructuredBuffer, bool bUseUAVCounter, bool bAppendBuffer) final override
 Creates an unordered access view of the given structured buffer.
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHITexture *Texture, uint32 MipLevel) final override
 Creates an unordered access view of the given texture.
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHIVertexBuffer *VertexBuffer, uint8 Format) final override
 Creates an unordered access view of the given vertex buffer.
 
virtual FVertexBufferRHIRef RHICreateVertexBuffer (uint32 Size, uint32 InUsage, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo) final override
 
virtual ETextureReallocationStatus RHIFinalizeAsyncReallocateTexture2D (FRHITexture2D *Texture2D, bool bBlockUntilCompleted) final override
 Finalizes an async reallocation request. 更多...
 
virtual bool RHIGetAvailableResolutions (FScreenResolutionArray &Resolutions, bool bIgnoreRefreshRate) final override
 Retrieve available screen resolutions. 更多...
 
virtual uint64 RHIGetMinimumAlignmentForBufferBackedSRV (EPixelFormat Format) final override
 Gets the minimum alignment (in bytes) required for creating a shader resource view on a buffer-backed resource. 更多...
 
virtual void * RHIGetNativeDevice () final override
 Provides access to the native device. 更多...
 
virtual void * RHIGetNativeInstance () final override
 Provides access to the native instance. 更多...
 
virtual void RHIGetResourceInfo (FRHITexture *Ref, FRHIResourceInfo &OutInfo) final override
 
virtual void RHIGetSupportedResolution (uint32 &Width, uint32 &Height) final override
 Returns a supported screen resolution that most closely matches input. 更多...
 
virtual void RHIGetTextureMemoryStats (FTextureMemoryStats &OutStats) final override
 Retrieves texture memory stats. 更多...
 
virtual bool RHIGetTextureMemoryVisualizeData (FColor *TextureData, int32 SizeX, int32 SizeY, int32 Pitch, int32 PixelSize) final override
 Fills a texture with to visualize the texture pool memory. 更多...
 
virtual void * RHILockStagingBuffer (FRHIStagingBuffer *StagingBuffer, FRHIGPUFence *Fence, uint32 Offset, uint32 SizeRHI) final override
 Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. 更多...
 
virtual void * RHILockTexture2D (FRHITexture2D *Texture, uint32 MipIndex, EResourceLockMode LockMode, uint32 &DestStride, bool bLockWithinMiptail) final override
 Locks an RHI texture's mip-map for read/write operations on the CPU 更多...
 
virtual void * RHILockTexture2DArray (FRHITexture2DArray *Texture, uint32 TextureIndex, uint32 MipIndex, EResourceLockMode LockMode, uint32 &DestStride, bool bLockWithinMiptail) final override
 Locks an RHI texture's mip-map for read/write operations on the CPU 更多...
 
virtual void * RHILockTextureCubeFace (FRHITextureCube *Texture, uint32 FaceIndex, uint32 ArrayIndex, uint32 MipIndex, EResourceLockMode LockMode, uint32 &DestStride, bool bLockWithinMiptail) final override
 Locks an RHI texture's mip-map for read/write operations on the CPU 更多...
 
virtual void RHIMapStagingSurface (FRHITexture *Texture, FRHIGPUFence *Fence, void *&OutData, int32 &OutWidth, int32 &OutHeight, uint32 GPUIndex=0) final override
 Watch out for OutData to be 0 (can happen on DXGI_ERROR_DEVICE_REMOVED), don't call RHIUnmapStagingSurface in that case.
 
virtual void RHIReadSurfaceData (FRHITexture *Texture, FIntRect Rect, TArray< FColor > &OutData, FReadSurfaceDataFlags InFlags) final override
 Reads the contents of a texture to an output buffer (non MSAA and MSAA) and returns it as a FColor array. 更多...
 
virtual void RHITransferIndexBufferUnderlyingResource (FRHIIndexBuffer *DestIndexBuffer, FRHIIndexBuffer *SrcIndexBuffer) final override
 Transfer metadata and underlying resource from src to dest and release any resource owned by dest. 更多...
 
virtual void RHITransferVertexBufferUnderlyingResource (FRHIVertexBuffer *DestVertexBuffer, FRHIVertexBuffer *SrcVertexBuffer) final override
 Transfer metadata and underlying resource from src to dest and release any resource owned by dest. 更多...
 
virtual void RHIUnlockStagingBuffer (FRHIStagingBuffer *StagingBuffer) final override
 Unlock a staging buffer previously locked with RHILockStagingBuffer. 更多...
 
virtual void RHIUnlockTexture2D (FRHITexture2D *Texture, uint32 MipIndex, bool bLockWithinMiptail) final override
 Unlocks a previously locked RHI texture resource 更多...
 
virtual void RHIUnlockTexture2DArray (FRHITexture2DArray *Texture, uint32 TextureIndex, uint32 MipIndex, bool bLockWithinMiptail) final override
 Unlocks a previously locked RHI texture resource 更多...
 
virtual void RHIUnlockTextureCubeFace (FRHITextureCube *Texture, uint32 FaceIndex, uint32 ArrayIndex, uint32 MipIndex, bool bLockWithinMiptail) final override
 Unlocks a previously locked RHI texture resource 更多...
 
virtual void RHIUnmapStagingSurface (FRHITexture *Texture, uint32 GPUIndex=0) final override
 call after a succesful RHIMapStagingSurface() call
 
virtual void RHIUpdateTexture2D (FRHITexture2D *Texture, uint32 MipIndex, const struct FUpdateTextureRegion2D &UpdateRegion, uint32 SourcePitch, const uint8 *SourceData) final override
 Updates a region of a 2D texture from system memory 更多...
 
virtual void RHIUpdateTexture3D (FRHITexture3D *Texture, uint32 MipIndex, const struct FUpdateTextureRegion3D &UpdateRegion, uint32 SourceRowPitch, uint32 SourceDepthPitch, const uint8 *SourceData) final override
 Updates a region of a 3D texture from system memory 更多...
 
virtual void RHIVirtualTextureSetFirstMipInMemory (FRHITexture2D *Texture, uint32 FirstMip) final override
 Function that is used to allocate / free space used for virtual texture mip levels. 更多...
 
virtual void RHIVirtualTextureSetFirstMipVisible (FRHITexture2D *Texture, uint32 FirstMip) final override
 Function that can be used to update which is the first visible mip to the GPU. 更多...
 
virtual void Shutdown () final override
 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).
 
 ~FVulkanDynamicRHI ()
 Destructor
 
- Public 成员函数 继承自 FDynamicRHI
virtual void Init ()=0
 Initializes the RHI; separate from IDynamicRHIModule::CreateRHI so that GDynamicRHI is set when it is called.
 
void InitPixelFormatInfo (const TArray< uint32 > &PixelFormatBlockBytesIn)
 Called after PostInit to initialize the pixel format info, which is needed for some commands default implementations
 
virtual void * LockStagingBuffer_RenderThread (class FRHICommandListImmediate &RHICmdList, FRHIStagingBuffer *StagingBuffer, FRHIGPUFence *Fence, uint32 Offset, uint32 SizeRHI)
 Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. 更多...
 
virtual void PostInit ()
 Called after the RHI is initialized; before the render thread is started.
 
virtual FTexture2DRHIRef RHIAsyncCreateTexture2D (uint32 SizeX, uint32 SizeY, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, void **InitialMipData, uint32 NumInitialMips)=0
 Thread-safe function that can be used to create a texture outside of the rendering thread. 更多...
 
virtual FTexture2DRHIRef RHIAsyncReallocateTexture2D (FRHITexture2D *Texture2D, int32 NewMipCount, int32 NewSizeX, int32 NewSizeY, FThreadSafeCounter *RequestStatus)=0
 Starts an asynchronous texture reallocation. 更多...
 
virtual uint64 RHICalcTexture2DPlatformSize (uint32 SizeX, uint32 SizeY, uint8 Format, uint32 NumMips, uint32 NumSamples, ETextureCreateFlags Flags, const FRHIResourceCreateInfo &CreateInfo, uint32 &OutAlign)=0
 Computes the total size of a 2D texture with the specified parameters. 更多...
 
virtual uint64 RHICalcTexture3DPlatformSize (uint32 SizeX, uint32 SizeY, uint32 SizeZ, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, const FRHIResourceCreateInfo &CreateInfo, uint32 &OutAlign)=0
 Computes the total size of a 3D texture with the specified parameters. 更多...
 
virtual uint64 RHICalcTextureCubePlatformSize (uint32 Size, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, const FRHIResourceCreateInfo &CreateInfo, uint32 &OutAlign)=0
 Computes the total size of a cube texture with the specified parameters. 更多...
 
virtual uint64 RHICalcVMTexture2DPlatformSize (uint32 Mip0Width, uint32 Mip0Height, uint8 Format, uint32 NumMips, uint32 FirstMipIdx, uint32 NumSamples, ETextureCreateFlags Flags, uint32 &OutAlign)
 Computes the total size of a virtual memory (VM) based 2D texture with the specified parameters. 更多...
 
virtual ETextureReallocationStatus RHICancelAsyncReallocateTexture2D (FRHITexture2D *Texture2D, bool bBlockUntilCompleted)=0
 Cancels an async reallocation for the specified texture. 更多...
 
virtual uint32 RHIComputeMemorySize (FRHITexture *TextureRHI)=0
 Computes the size in memory required by a given texture. 更多...
 
virtual void RHICopySharedMips (FRHITexture2D *DestTexture2D, FRHITexture2D *SrcTexture2D)=0
 Copies shared mip levels from one texture to another. 更多...
 
virtual void RHICopyVertexBuffer (FRHIVertexBuffer *SourceBuffer, FRHIVertexBuffer *DestBuffer)=0
 Copies the contents of one vertex buffer to another vertex buffer. 更多...
 
virtual FBoundShaderStateRHIRef RHICreateBoundShaderState (FRHIVertexDeclaration *VertexDeclaration, FRHIVertexShader *VertexShader, FRHIHullShader *HullShader, FRHIDomainShader *DomainShader, FRHIPixelShader *PixelShader, FRHIGeometryShader *GeometryShader)=0
 Creates a bound shader state instance which encapsulates a decl, vertex shader, hull shader, domain shader and pixel shader CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread or the RHI thread. 更多...
 
FComputeFenceRHIRef RHICreateComputeFence (const FName &Name)
 Creates a compute fence. 更多...
 
virtual FGraphicsPipelineStateRHIRef RHICreateGraphicsPipelineState (const FGraphicsPipelineStateInitializer &Initializer)
 Creates a graphics pipeline state object (PSO) that represents a complete gpu pipeline for rendering. 更多...
 
virtual FRenderQueryPoolRHIRef RHICreateRenderQueryPool (ERenderQueryType QueryType, uint32 NumQueries=UINT32_MAX)
 Creates a pool for querys like timers or occlusion queries. 更多...
 
virtual FRHIShaderLibraryRef RHICreateShaderLibrary (EShaderPlatform Platform, FString const &FilePath, FString const &Name)
 Attempts to open a shader library for the given shader platform & name within the provided directory. 更多...
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (const FShaderResourceViewInitializer &Initializer)=0
 Creates a shader resource view
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHIIndexBuffer *Buffer)=0
 Creates a shader resource view of the given index buffer.
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHIStructuredBuffer *StructuredBuffer)=0
 Creates a shader resource view of the given structured buffer.
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHITexture *Texture2DRHI, const FRHITextureSRVCreateInfo &CreateInfo)=0
 Creates a shader resource view for a texture
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceView (FRHIVertexBuffer *VertexBuffer, uint32 Stride, uint8 Format)=0
 Creates a shader resource view of the given vertex buffer.
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceViewFMask (FRHITexture2D *Texture2DRHI)
 Create a shader resource view that can be used to access the multi-sample fmask metadata of a render target on supported platforms.
 
virtual FShaderResourceViewRHIRef RHICreateShaderResourceViewWriteMask (FRHITexture2D *Texture2DRHI)
 Create a shader resource view that can be used to access the write mask metadata of a render target on supported platforms.
 
virtual FStagingBufferRHIRef RHICreateStagingBuffer ()
 Creates a staging buffer, which is memory visible to the cpu without any locking. 更多...
 
virtual FStructuredBufferRHIRef RHICreateStructuredBuffer (uint32 Stride, uint32 Size, uint32 InUsage, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)=0
 
virtual FTexture2DRHIRef RHICreateTexture2D (uint32 SizeX, uint32 SizeY, uint8 Format, uint32 NumMips, uint32 NumSamples, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)=0
 Creates a 2D RHI texture resource 更多...
 
virtual FTexture2DArrayRHIRef RHICreateTexture2DArray (uint32 SizeX, uint32 SizeY, uint32 SizeZ, uint8 Format, uint32 NumMips, uint32 NumSamples, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)=0
 Creates a Array RHI texture resource 更多...
 
virtual FTexture3DRHIRef RHICreateTexture3D (uint32 SizeX, uint32 SizeY, uint32 SizeZ, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)=0
 Creates a 3d RHI texture resource 更多...
 
virtual FTextureCubeRHIRef RHICreateTextureCube (uint32 Size, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)=0
 Creates a Cube RHI texture resource 更多...
 
virtual FTextureCubeRHIRef RHICreateTextureCubeArray (uint32 Size, uint32 ArraySize, uint8 Format, uint32 NumMips, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)=0
 Creates a Cube Array RHI texture resource 更多...
 
virtual FTexture2DRHIRef RHICreateTextureExternal2D (uint32 SizeX, uint32 SizeY, uint8 Format, uint32 NumMips, uint32 NumSamples, ETextureCreateFlags Flags, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)
 Creates a 2D RHI texture external resource 更多...
 
virtual FUniformBufferRHIRef RHICreateUniformBuffer (const void *Contents, const FRHIUniformBufferLayout &Layout, EUniformBufferUsage Usage, EUniformBufferValidation Validation)=0
 Creates a uniform buffer. 更多...
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHIIndexBuffer *IndexBuffer, uint8 Format)=0
 Creates an unordered access view of the given index buffer.
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHIStructuredBuffer *StructuredBuffer, bool bUseUAVCounter, bool bAppendBuffer)=0
 Creates an unordered access view of the given structured buffer.
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHITexture *Texture, uint32 MipLevel)=0
 Creates an unordered access view of the given texture.
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHITexture *Texture, uint32 MipLevel, uint8 Format)
 Creates an unordered access view of the given texture.
 
virtual FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView (FRHIVertexBuffer *VertexBuffer, uint8 Format)=0
 Creates an unordered access view of the given vertex buffer.
 
virtual FVertexBufferRHIRef RHICreateVertexBuffer (uint32 Size, uint32 InUsage, ERHIAccess InResourceState, FRHIResourceCreateInfo &CreateInfo)=0
 
virtual ETextureReallocationStatus RHIFinalizeAsyncReallocateTexture2D (FRHITexture2D *Texture2D, bool bBlockUntilCompleted)=0
 Finalizes an async reallocation request. 更多...
 
virtual void RHIGenerateMips (FRHITexture *Texture)
 Generates mip maps for a texture.
 
virtual bool RHIGetAvailableResolutions (FScreenResolutionArray &Resolutions, bool bIgnoreRefreshRate)=0
 Retrieve available screen resolutions. 更多...
 
virtual uint64 RHIGetMinimumAlignmentForBufferBackedSRV (EPixelFormat Format)
 Gets the minimum alignment (in bytes) required for creating a shader resource view on a buffer-backed resource. 更多...
 
virtual void * RHIGetNativeDevice ()=0
 Provides access to the native device. 更多...
 
virtual void * RHIGetNativeInstance ()=0
 Provides access to the native instance. 更多...
 
virtual void RHIGetResourceInfo (FRHITexture *Ref, FRHIResourceInfo &OutInfo)=0
 
virtual void RHIGetSupportedResolution (uint32 &Width, uint32 &Height)=0
 Returns a supported screen resolution that most closely matches input. 更多...
 
virtual void RHIGetTextureMemoryStats (FTextureMemoryStats &OutStats)=0
 Retrieves texture memory stats. 更多...
 
virtual bool RHIGetTextureMemoryVisualizeData (FColor *TextureData, int32 SizeX, int32 SizeY, int32 Pitch, int32 PixelSize)=0
 Fills a texture with to visualize the texture pool memory. 更多...
 
virtual void * RHILockStagingBuffer (FRHIStagingBuffer *StagingBuffer, FRHIGPUFence *Fence, uint32 Offset, uint32 SizeRHI)
 Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. 更多...
 
virtual void * RHILockTexture2D (FRHITexture2D *Texture, uint32 MipIndex, EResourceLockMode LockMode, uint32 &DestStride, bool bLockWithinMiptail)=0
 Locks an RHI texture's mip-map for read/write operations on the CPU 更多...
 
virtual void * RHILockTexture2DArray (FRHITexture2DArray *Texture, uint32 TextureIndex, uint32 MipIndex, EResourceLockMode LockMode, uint32 &DestStride, bool bLockWithinMiptail)=0
 Locks an RHI texture's mip-map for read/write operations on the CPU 更多...
 
virtual void * RHILockTextureCubeFace (FRHITextureCube *Texture, uint32 FaceIndex, uint32 ArrayIndex, uint32 MipIndex, EResourceLockMode LockMode, uint32 &DestStride, bool bLockWithinMiptail)=0
 Locks an RHI texture's mip-map for read/write operations on the CPU 更多...
 
virtual void RHIMapStagingSurface (FRHITexture *Texture, FRHIGPUFence *Fence, void *&OutData, int32 &OutWidth, int32 &OutHeight, uint32 GPUIndex=0)=0
 Watch out for OutData to be 0 (can happen on DXGI_ERROR_DEVICE_REMOVED), don't call RHIUnmapStagingSurface in that case.
 
virtual void RHIPerFrameRHIFlushComplete ()
 Called once per frame just before deferred deletion in FRHIResource::FlushPendingDeletes
 
virtual void RHIReadSurfaceData (FRHITexture *Texture, FIntRect Rect, TArray< FColor > &OutData, FReadSurfaceDataFlags InFlags)=0
 Reads the contents of a texture to an output buffer (non MSAA and MSAA) and returns it as a FColor array. 更多...
 
virtual void RHITransferIndexBufferUnderlyingResource (FRHIIndexBuffer *DestIndexBuffer, FRHIIndexBuffer *SrcIndexBuffer)
 Transfer metadata and underlying resource from src to dest and release any resource owned by dest. 更多...
 
virtual void RHITransferTexture (FRHITexture2D *Texture, FIntRect Rect, uint32 SrcGPUIndex, uint32 DestGPUIndex, bool PullData)
 Synchronizes the content of a texture resource between two GPUs using a copy operation. 更多...
 
virtual void RHITransferVertexBufferUnderlyingResource (FRHIVertexBuffer *DestVertexBuffer, FRHIVertexBuffer *SrcVertexBuffer)
 Transfer metadata and underlying resource from src to dest and release any resource owned by dest. 更多...
 
virtual void RHIUnlockStagingBuffer (FRHIStagingBuffer *StagingBuffer)
 Unlock a staging buffer previously locked with RHILockStagingBuffer. 更多...
 
virtual void RHIUnlockTexture2D (FRHITexture2D *Texture, uint32 MipIndex, bool bLockWithinMiptail)=0
 Unlocks a previously locked RHI texture resource 更多...
 
virtual void RHIUnlockTexture2DArray (FRHITexture2DArray *Texture, uint32 TextureIndex, uint32 MipIndex, bool bLockWithinMiptail)=0
 Unlocks a previously locked RHI texture resource 更多...
 
virtual void RHIUnlockTextureCubeFace (FRHITextureCube *Texture, uint32 FaceIndex, uint32 ArrayIndex, uint32 MipIndex, bool bLockWithinMiptail)=0
 Unlocks a previously locked RHI texture resource 更多...
 
virtual void RHIUnmapStagingSurface (FRHITexture *Texture, uint32 GPUIndex=0)=0
 call after a succesful RHIMapStagingSurface() call
 
virtual void RHIUpdateFromBufferTexture2D (FRHITexture2D *Texture, uint32 MipIndex, const struct FUpdateTextureRegion2D &UpdateRegion, uint32 SourcePitch, FRHIStructuredBuffer *Buffer, uint32 BufferOffset)
 Updates a region of a 2D texture from GPU memory provided by the given buffer (may not be implemented on every platform) 更多...
 
virtual void RHIUpdateTexture2D (FRHITexture2D *Texture, uint32 MipIndex, const struct FUpdateTextureRegion2D &UpdateRegion, uint32 SourcePitch, const uint8 *SourceData)=0
 Updates a region of a 2D texture from system memory 更多...
 
virtual void RHIUpdateTexture3D (FRHITexture3D *Texture, uint32 MipIndex, const struct FUpdateTextureRegion3D &UpdateRegion, uint32 SourceRowPitch, uint32 SourceDepthPitch, const uint8 *SourceData)=0
 Updates a region of a 3D texture from system memory 更多...
 
virtual void RHIVirtualTextureSetFirstMipInMemory (FRHITexture2D *Texture, uint32 FirstMip)=0
 Function that is used to allocate / free space used for virtual texture mip levels. 更多...
 
virtual void RHIVirtualTextureSetFirstMipVisible (FRHITexture2D *Texture, uint32 FirstMip)=0
 Function that can be used to update which is the first visible mip to the GPU. 更多...
 
virtual void Shutdown ()=0
 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).
 
virtual void UnlockStagingBuffer_RenderThread (class FRHICommandListImmediate &RHICmdList, FRHIStagingBuffer *StagingBuffer)
 Unlock a staging buffer previously locked with LockStagingBuffer_RenderThread. 更多...
 
virtual ~FDynamicRHI ()
 Declare a virtual destructor, so the dynamic RHI can be deleted without knowing its type.
 

Protected 属性

TRefCountPtr< FVulkanViewport > DrawingViewport
 The viewport which is currently being drawn.
 
TArray< FVulkanViewport * > Viewports
 A list of all viewport RHIs that have been created.
 

详细描述

The interface which is implemented by the dynamically bound RHI.

成员函数说明

◆ RHIAsyncCreateTexture2D()

virtual FTexture2DRHIRef FVulkanDynamicRHI::RHIAsyncCreateTexture2D ( uint32  SizeX,
uint32  SizeY,
uint8  Format,
uint32  NumMips,
ETextureCreateFlags  Flags,
ERHIAccess  InResourceState,
void **  InitialMipData,
uint32  NumInitialMips 
)
finaloverridevirtual

Thread-safe function that can be used to create a texture outside of the rendering thread.

This function can ONLY be called if GRHISupportsAsyncTextureCreation is true. Cannot create rendertargets with this method.

参数
SizeX- width of the texture to create
SizeY- height of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
Flags- ETextureCreateFlags creation flags
InitialMipData- pointers to mip data with which to create the texture
NumInitialMips- how many mips are provided in InitialMipData
返回
a reference to a 2D texture resource

实现了 FDynamicRHI.

◆ RHIAsyncReallocateTexture2D()

virtual FTexture2DRHIRef FVulkanDynamicRHI::RHIAsyncReallocateTexture2D ( FRHITexture2D *  Texture2D,
int32  NewMipCount,
int32  NewSizeX,
int32  NewSizeY,
FThreadSafeCounter *  RequestStatus 
)
finaloverridevirtual

Starts an asynchronous texture reallocation.

It may complete immediately if the reallocation could be performed without any reshuffling of texture memory, or if there isn't enough memory. The specified status counter will be decremented by 1 when the reallocation is complete (success or failure).

Returns a new reference to the texture, which will represent the new mip count when the reallocation is complete. RHIFinalizeAsyncReallocateTexture2D() must be called to complete the reallocation.

参数
Texture2D- Texture to reallocate
NewMipCount- New number of mip-levels
NewSizeX- New width, in pixels
NewSizeY- New height, in pixels
RequestStatus- Will be decremented by 1 when the reallocation is complete (success or failure).
返回
- New reference to the texture, or an invalid reference upon failure

实现了 FDynamicRHI.

◆ RHICalcTexture2DPlatformSize()

virtual uint64 FVulkanDynamicRHI::RHICalcTexture2DPlatformSize ( uint32  SizeX,
uint32  SizeY,
uint8  Format,
uint32  NumMips,
uint32  NumSamples,
ETextureCreateFlags  Flags,
const FRHIResourceCreateInfo &  CreateInfo,
uint32 &  OutAlign 
)
finaloverridevirtual

Computes the total size of a 2D texture with the specified parameters.

参数
SizeX- width of the texture to compute
SizeY- height of the texture to compute
Format- EPixelFormat texture format
NumMips- number of mips to compute or 0 for full mip pyramid
NumSamples- number of MSAA samples, usually 1
Flags- ETextureCreateFlags creation flags
OutAlign- Alignment required for this texture. Output parameter.

实现了 FDynamicRHI.

◆ RHICalcTexture3DPlatformSize()

virtual uint64 FVulkanDynamicRHI::RHICalcTexture3DPlatformSize ( uint32  SizeX,
uint32  SizeY,
uint32  SizeZ,
uint8  Format,
uint32  NumMips,
ETextureCreateFlags  Flags,
const FRHIResourceCreateInfo &  CreateInfo,
uint32 &  OutAlign 
)
finaloverridevirtual

Computes the total size of a 3D texture with the specified parameters.

参数
SizeX- width of the texture to create
SizeY- height of the texture to create
SizeZ- depth of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
Flags- ETextureCreateFlags creation flags
OutAlign- Alignment required for this texture. Output parameter.

实现了 FDynamicRHI.

◆ RHICalcTextureCubePlatformSize()

virtual uint64 FVulkanDynamicRHI::RHICalcTextureCubePlatformSize ( uint32  Size,
uint8  Format,
uint32  NumMips,
ETextureCreateFlags  Flags,
const FRHIResourceCreateInfo &  CreateInfo,
uint32 &  OutAlign 
)
finaloverridevirtual

Computes the total size of a cube texture with the specified parameters.

参数
Size- width/height of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
Flags- ETextureCreateFlags creation flags
OutAlign- Alignment required for this texture. Output parameter.

实现了 FDynamicRHI.

◆ RHICancelAsyncReallocateTexture2D()

virtual ETextureReallocationStatus FVulkanDynamicRHI::RHICancelAsyncReallocateTexture2D ( FRHITexture2D *  Texture2D,
bool  bBlockUntilCompleted 
)
finaloverridevirtual

Cancels an async reallocation for the specified texture.

This should be called for the new texture, not the original.

参数
TextureTexture to cancel
bBlockUntilCompletedIf true, blocks until the cancellation is fully completed
返回
Reallocation status

实现了 FDynamicRHI.

◆ RHIComputeMemorySize()

virtual uint32 FVulkanDynamicRHI::RHIComputeMemorySize ( FRHITexture *  TextureRHI)
finaloverridevirtual

Computes the size in memory required by a given texture.

参数
TextureRHI- Texture we want to know the size of, 0 is safely ignored
返回
- Size in Bytes

实现了 FDynamicRHI.

◆ RHICopySharedMips()

virtual void FVulkanDynamicRHI::RHICopySharedMips ( FRHITexture2D *  DestTexture2D,
FRHITexture2D *  SrcTexture2D 
)
finaloverridevirtual

Copies shared mip levels from one texture to another.

The textures must have full mip chains, share the same format, and have the same aspect ratio. This copy will not cause synchronization with the GPU.

参数
DestTexture2D- destination texture
SrcTexture2D- source texture

实现了 FDynamicRHI.

◆ RHICopyVertexBuffer()

virtual void FVulkanDynamicRHI::RHICopyVertexBuffer ( FRHIVertexBuffer *  SourceBuffer,
FRHIVertexBuffer *  DestBuffer 
)
finaloverridevirtual

Copies the contents of one vertex buffer to another vertex buffer.

They must have identical sizes.

实现了 FDynamicRHI.

◆ RHICreateBoundShaderState()

virtual FBoundShaderStateRHIRef FVulkanDynamicRHI::RHICreateBoundShaderState ( FRHIVertexDeclaration *  VertexDeclaration,
FRHIVertexShader *  VertexShader,
FRHIHullShader *  HullShader,
FRHIDomainShader *  DomainShader,
FRHIPixelShader *  PixelShader,
FRHIGeometryShader *  GeometryShader 
)
finaloverridevirtual

Creates a bound shader state instance which encapsulates a decl, vertex shader, hull shader, domain shader and pixel shader CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread or the RHI thread.

It need not be threadsafe unless the RHI support parallel translation. CAUTION: Platforms that support RHIThread but don't actually have a threadsafe implementation must flush internally with FScopedRHIThreadStaller StallRHIThread(FRHICommandListExecutor::GetImmediateCommandList()); when the call is from the render thread

参数
VertexDeclaration- existing vertex decl
VertexShader- existing vertex shader
HullShader- existing hull shader
DomainShader- existing domain shader
GeometryShader- existing geometry shader
PixelShader- existing pixel shader

实现了 FDynamicRHI.

◆ RHICreateGraphicsPipelineState()

virtual FGraphicsPipelineStateRHIRef FVulkanDynamicRHI::RHICreateGraphicsPipelineState ( const FGraphicsPipelineStateInitializer &  Initializer)
finaloverridevirtual

Creates a graphics pipeline state object (PSO) that represents a complete gpu pipeline for rendering.

This function should be considered expensive to call at runtime and may cause hitches as pipelines are compiled.

参数
Initializer- Descriptor object defining all the information needed to create the PSO, as well as behavior hints to the RHI.
返回
FGraphicsPipelineStateRHIRef that can be bound for rendering; nullptr if the compilation fails. CAUTION: On certain RHI implementations (eg, ones that do not support runtime compilation) a compilation failure is a Fatal error and this function will not return. CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread or the RHI thread. It need not be threadsafe unless the RHI support parallel translation. CAUTION: Platforms that support RHIThread but don't actually have a threadsafe implementation must flush internally with FScopedRHIThreadStaller StallRHIThread(FRHICommandListExecutor::GetImmediateCommandList()); when the call is from the render thread

重载 FDynamicRHI .

◆ RHICreateStagingBuffer()

virtual FStagingBufferRHIRef FVulkanDynamicRHI::RHICreateStagingBuffer ( )
finaloverridevirtual

Creates a staging buffer, which is memory visible to the cpu without any locking.

返回
The new staging-buffer.

重载 FDynamicRHI .

◆ RHICreateStructuredBuffer()

virtual FStructuredBufferRHIRef FVulkanDynamicRHI::RHICreateStructuredBuffer ( uint32  Stride,
uint32  Size,
uint32  InUsage,
ERHIAccess  InResourceState,
FRHIResourceCreateInfo &  CreateInfo 
)
finaloverridevirtual
参数
ResourceArray- An optional pointer to a resource array containing the resource's data.

实现了 FDynamicRHI.

◆ RHICreateTexture2D()

virtual FTexture2DRHIRef FVulkanDynamicRHI::RHICreateTexture2D ( uint32  SizeX,
uint32  SizeY,
uint8  Format,
uint32  NumMips,
uint32  NumSamples,
ETextureCreateFlags  Flags,
ERHIAccess  InResourceState,
FRHIResourceCreateInfo &  CreateInfo 
)
finaloverridevirtual

Creates a 2D RHI texture resource

参数
SizeX- width of the texture to create
SizeY- height of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
NumSamples- number of MSAA samples, usually 1
Flags- ETextureCreateFlags creation flags

实现了 FDynamicRHI.

◆ RHICreateTexture2DArray()

virtual FTexture2DArrayRHIRef FVulkanDynamicRHI::RHICreateTexture2DArray ( uint32  SizeX,
uint32  SizeY,
uint32  SizeZ,
uint8  Format,
uint32  NumMips,
uint32  NumSamples,
ETextureCreateFlags  Flags,
ERHIAccess  InResourceState,
FRHIResourceCreateInfo &  CreateInfo 
)
finaloverridevirtual

Creates a Array RHI texture resource

参数
SizeX- width of the texture to create
SizeY- height of the texture to create
SizeZ- depth of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
NumSamples- number of MSAA samples, usually 1
Flags- ETextureCreateFlags creation flags

实现了 FDynamicRHI.

◆ RHICreateTexture3D()

virtual FTexture3DRHIRef FVulkanDynamicRHI::RHICreateTexture3D ( uint32  SizeX,
uint32  SizeY,
uint32  SizeZ,
uint8  Format,
uint32  NumMips,
ETextureCreateFlags  Flags,
ERHIAccess  InResourceState,
FRHIResourceCreateInfo &  CreateInfo 
)
finaloverridevirtual

Creates a 3d RHI texture resource

参数
SizeX- width of the texture to create
SizeY- height of the texture to create
SizeZ- depth of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
Flags- ETextureCreateFlags creation flags

实现了 FDynamicRHI.

◆ RHICreateTextureCube()

virtual FTextureCubeRHIRef FVulkanDynamicRHI::RHICreateTextureCube ( uint32  Size,
uint8  Format,
uint32  NumMips,
ETextureCreateFlags  Flags,
ERHIAccess  InResourceState,
FRHIResourceCreateInfo &  CreateInfo 
)
finaloverridevirtual

Creates a Cube RHI texture resource

参数
Size- width/height of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
Flags- ETextureCreateFlags creation flags

实现了 FDynamicRHI.

◆ RHICreateTextureCubeArray()

virtual FTextureCubeRHIRef FVulkanDynamicRHI::RHICreateTextureCubeArray ( uint32  Size,
uint32  ArraySize,
uint8  Format,
uint32  NumMips,
ETextureCreateFlags  Flags,
ERHIAccess  InResourceState,
FRHIResourceCreateInfo &  CreateInfo 
)
finaloverridevirtual

Creates a Cube Array RHI texture resource

参数
Size- width/height of the texture to create
ArraySize- number of array elements of the texture to create
Format- EPixelFormat texture format
NumMips- number of mips to generate or 0 for full mip pyramid
Flags- ETextureCreateFlags creation flags

实现了 FDynamicRHI.

◆ RHICreateUniformBuffer()

virtual FUniformBufferRHIRef FVulkanDynamicRHI::RHICreateUniformBuffer ( const void *  Contents,
const FRHIUniformBufferLayout &  Layout,
EUniformBufferUsage  Usage,
EUniformBufferValidation  Validation 
)
finaloverridevirtual

Creates a uniform buffer.

The contents of the uniform buffer are provided in a parameter, and are immutable. CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread or the RHI thread. Thus is need not be threadsafe on platforms that do not support or aren't using an RHIThread

参数
Contents- A pointer to a memory block of size NumBytes that is copied into the new uniform buffer.
NumBytes- The number of bytes the uniform buffer should contain.
返回
The new uniform buffer.

实现了 FDynamicRHI.

◆ RHICreateVertexBuffer()

virtual FVertexBufferRHIRef FVulkanDynamicRHI::RHICreateVertexBuffer ( uint32  Size,
uint32  InUsage,
ERHIAccess  InResourceState,
FRHIResourceCreateInfo &  CreateInfo 
)
finaloverridevirtual
参数
ResourceArray- An optional pointer to a resource array containing the resource's data.

实现了 FDynamicRHI.

◆ RHIFinalizeAsyncReallocateTexture2D()

virtual ETextureReallocationStatus FVulkanDynamicRHI::RHIFinalizeAsyncReallocateTexture2D ( FRHITexture2D *  Texture2D,
bool  bBlockUntilCompleted 
)
finaloverridevirtual

Finalizes an async reallocation request.

If bBlockUntilCompleted is false, it will only poll the status and finalize if the reallocation has completed.

参数
Texture2D- Texture to finalize the reallocation for
bBlockUntilCompleted- Whether the function should block until the reallocation has completed
返回
- Current reallocation status: TexRealloc_Succeeded Reallocation succeeded TexRealloc_Failed Reallocation failed TexRealloc_InProgress Reallocation is still in progress, try again later

实现了 FDynamicRHI.

◆ RHIGetAvailableResolutions()

virtual bool FVulkanDynamicRHI::RHIGetAvailableResolutions ( FScreenResolutionArray &  Resolutions,
bool  bIgnoreRefreshRate 
)
finaloverridevirtual

Retrieve available screen resolutions.

参数
ResolutionsTArray<FScreenResolutionRHI> parameter that will be filled in.
bIgnoreRefreshRateIf true, ignore refresh rates.
返回
bool true if successfully filled the array

实现了 FDynamicRHI.

◆ RHIGetMinimumAlignmentForBufferBackedSRV()

virtual uint64 FVulkanDynamicRHI::RHIGetMinimumAlignmentForBufferBackedSRV ( EPixelFormat  Format)
finaloverridevirtual

Gets the minimum alignment (in bytes) required for creating a shader resource view on a buffer-backed resource.

参数
Format- EPixelFormat texture format of the SRV.

重载 FDynamicRHI .

◆ RHIGetNativeDevice()

virtual void * FVulkanDynamicRHI::RHIGetNativeDevice ( )
finaloverridevirtual

Provides access to the native device.

Generally this should be avoided but is useful for third party plugins.

实现了 FDynamicRHI.

◆ RHIGetNativeInstance()

virtual void * FVulkanDynamicRHI::RHIGetNativeInstance ( )
finaloverridevirtual

Provides access to the native instance.

Generally this should be avoided but is useful for third party plugins.

实现了 FDynamicRHI.

◆ RHIGetResourceInfo()

virtual void FVulkanDynamicRHI::RHIGetResourceInfo ( FRHITexture *  Ref,
FRHIResourceInfo &  OutInfo 
)
finaloverridevirtual
参数
Refmay be 0

实现了 FDynamicRHI.

◆ RHIGetSupportedResolution()

virtual void FVulkanDynamicRHI::RHIGetSupportedResolution ( uint32 &  Width,
uint32 &  Height 
)
finaloverridevirtual

Returns a supported screen resolution that most closely matches input.

参数
Width- Input: Desired resolution width in pixels. Output: A width that the platform supports.
Height- Input: Desired resolution height in pixels. Output: A height that the platform supports.

实现了 FDynamicRHI.

◆ RHIGetTextureMemoryStats()

virtual void FVulkanDynamicRHI::RHIGetTextureMemoryStats ( FTextureMemoryStats &  OutStats)
finaloverridevirtual

Retrieves texture memory stats.

safe to call on the main thread

实现了 FDynamicRHI.

◆ RHIGetTextureMemoryVisualizeData()

virtual bool FVulkanDynamicRHI::RHIGetTextureMemoryVisualizeData ( FColor *  TextureData,
int32  SizeX,
int32  SizeY,
int32  Pitch,
int32  PixelSize 
)
finaloverridevirtual

Fills a texture with to visualize the texture pool memory.

参数
TextureDataStart address
SizeXNumber of pixels along X
SizeYNumber of pixels along Y
PitchNumber of bytes between each row
PixelSizeNumber of bytes each pixel represents
返回
true if successful, false otherwise

实现了 FDynamicRHI.

◆ RHILockStagingBuffer()

virtual void * FVulkanDynamicRHI::RHILockStagingBuffer ( FRHIStagingBuffer *  StagingBuffer,
FRHIGPUFence *  Fence,
uint32  Offset,
uint32  SizeRHI 
)
finaloverridevirtual

Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall.

@discussion This function requires that you have issued an CopyToStagingBuffer invocation and verified that the FRHIGPUFence has been signaled before calling.

参数
StagingBufferThe buffer to lock.
FenceAn optional fence synchronized with the last buffer update.
OffsetThe offset in the buffer to return.
SizeRHIThe length of the region in the buffer to lock.
返回
A pointer to the data starting at 'Offset' and of length 'SizeRHI' from 'StagingBuffer', or nullptr when there is an error.

重载 FDynamicRHI .

◆ RHILockTexture2D()

virtual void * FVulkanDynamicRHI::RHILockTexture2D ( FRHITexture2D *  Texture,
uint32  MipIndex,
EResourceLockMode  LockMode,
uint32 &  DestStride,
bool  bLockWithinMiptail 
)
finaloverridevirtual

Locks an RHI texture's mip-map for read/write operations on the CPU

参数
Texture- the RHI texture resource to lock, must not be 0
MipIndex- index of the mip level to lock
LockMode- Whether to lock the texture read-only instead of write-only
DestStride- output to retrieve the textures row stride (pitch)
bLockWithinMiptail- for platforms that support packed miptails allow locking of individual mip levels within the miptail
返回
pointer to the CPU accessible resource data

实现了 FDynamicRHI.

◆ RHILockTexture2DArray()

virtual void * FVulkanDynamicRHI::RHILockTexture2DArray ( FRHITexture2DArray *  Texture,
uint32  TextureIndex,
uint32  MipIndex,
EResourceLockMode  LockMode,
uint32 &  DestStride,
bool  bLockWithinMiptail 
)
finaloverridevirtual

Locks an RHI texture's mip-map for read/write operations on the CPU

参数
Texture- the RHI texture resource to lock
MipIndex- index of the mip level to lock
LockMode- Whether to lock the texture read-only instead of write-only
DestStride- output to retrieve the textures row stride (pitch)
bLockWithinMiptail- for platforms that support packed miptails allow locking of individual mip levels within the miptail
返回
pointer to the CPU accessible resource data

实现了 FDynamicRHI.

◆ RHILockTextureCubeFace()

virtual void * FVulkanDynamicRHI::RHILockTextureCubeFace ( FRHITextureCube *  Texture,
uint32  FaceIndex,
uint32  ArrayIndex,
uint32  MipIndex,
EResourceLockMode  LockMode,
uint32 &  DestStride,
bool  bLockWithinMiptail 
)
finaloverridevirtual

Locks an RHI texture's mip-map for read/write operations on the CPU

参数
Texture- the RHI texture resource to lock
MipIndex- index of the mip level to lock
LockMode- Whether to lock the texture read-only instead of write-only.
DestStride- output to retrieve the textures row stride (pitch)
bLockWithinMiptail- for platforms that support packed miptails allow locking of individual mip levels within the miptail
返回
pointer to the CPU accessible resource data

实现了 FDynamicRHI.

◆ RHIReadSurfaceData()

virtual void FVulkanDynamicRHI::RHIReadSurfaceData ( FRHITexture *  Texture,
FIntRect  Rect,
TArray< FColor > &  OutData,
FReadSurfaceDataFlags  InFlags 
)
finaloverridevirtual

Reads the contents of a texture to an output buffer (non MSAA and MSAA) and returns it as a FColor array.

If the format or texture type is unsupported the OutData array will be size 0

实现了 FDynamicRHI.

◆ RHITransferIndexBufferUnderlyingResource()

virtual void FVulkanDynamicRHI::RHITransferIndexBufferUnderlyingResource ( FRHIIndexBuffer *  DestIndexBuffer,
FRHIIndexBuffer *  SrcIndexBuffer 
)
finaloverridevirtual

Transfer metadata and underlying resource from src to dest and release any resource owned by dest.

参数
DestIndexBuffer- the index buffer to update
SrcIndexBuffer- don't use after call. If null, will release any resource owned by DestIndexBuffer

重载 FDynamicRHI .

◆ RHITransferVertexBufferUnderlyingResource()

virtual void FVulkanDynamicRHI::RHITransferVertexBufferUnderlyingResource ( FRHIVertexBuffer *  DestVertexBuffer,
FRHIVertexBuffer *  SrcVertexBuffer 
)
finaloverridevirtual

Transfer metadata and underlying resource from src to dest and release any resource owned by dest.

参数
DestVertexBuffer- the vertex buffer to update
SrcVertexBuffer- don't use after call. If null, will release any resource owned by DestVertexBuffer

重载 FDynamicRHI .

◆ RHIUnlockStagingBuffer()

virtual void FVulkanDynamicRHI::RHIUnlockStagingBuffer ( FRHIStagingBuffer *  StagingBuffer)
finaloverridevirtual

Unlock a staging buffer previously locked with RHILockStagingBuffer.

参数
StagingBufferThe buffer that was previously locked.

重载 FDynamicRHI .

◆ RHIUnlockTexture2D()

virtual void FVulkanDynamicRHI::RHIUnlockTexture2D ( FRHITexture2D *  Texture,
uint32  MipIndex,
bool  bLockWithinMiptail 
)
inlinefinaloverridevirtual

Unlocks a previously locked RHI texture resource

参数
Texture- the RHI texture resource to unlock, must not be 0
MipIndex- index of the mip level to unlock
bLockWithinMiptail- for platforms that support packed miptails allow locking of individual mip levels within the miptail

实现了 FDynamicRHI.

◆ RHIUnlockTexture2DArray()

virtual void FVulkanDynamicRHI::RHIUnlockTexture2DArray ( FRHITexture2DArray *  Texture,
uint32  TextureIndex,
uint32  MipIndex,
bool  bLockWithinMiptail 
)
finaloverridevirtual

Unlocks a previously locked RHI texture resource

参数
Texture- the RHI texture resource to unlock
MipIndex- index of the mip level to unlock
bLockWithinMiptail- for platforms that support packed miptails allow locking of individual mip levels within the miptail

实现了 FDynamicRHI.

◆ RHIUnlockTextureCubeFace()

virtual void FVulkanDynamicRHI::RHIUnlockTextureCubeFace ( FRHITextureCube *  Texture,
uint32  FaceIndex,
uint32  ArrayIndex,
uint32  MipIndex,
bool  bLockWithinMiptail 
)
finaloverridevirtual

Unlocks a previously locked RHI texture resource

参数
Texture- the RHI texture resource to unlock
MipIndex- index of the mip level to unlock
bLockWithinMiptail- for platforms that support packed miptails allow locking of individual mip levels within the miptail

实现了 FDynamicRHI.

◆ RHIUpdateTexture2D()

virtual void FVulkanDynamicRHI::RHIUpdateTexture2D ( FRHITexture2D *  Texture,
uint32  MipIndex,
const struct FUpdateTextureRegion2D &  UpdateRegion,
uint32  SourcePitch,
const uint8 *  SourceData 
)
inlinefinaloverridevirtual

Updates a region of a 2D texture from system memory

参数
Texture- the RHI texture resource to update
MipIndex- mip level index to be modified
UpdateRegion- The rectangle to copy source image data from
SourcePitch- size in bytes of each row of the source image
SourceData- source image data, starting at the upper left corner of the source rectangle (in same pixel format as texture)

实现了 FDynamicRHI.

◆ RHIUpdateTexture3D()

virtual void FVulkanDynamicRHI::RHIUpdateTexture3D ( FRHITexture3D *  Texture,
uint32  MipIndex,
const struct FUpdateTextureRegion3D &  UpdateRegion,
uint32  SourceRowPitch,
uint32  SourceDepthPitch,
const uint8 *  SourceData 
)
inlinefinaloverridevirtual

Updates a region of a 3D texture from system memory

参数
Texture- the RHI texture resource to update
MipIndex- mip level index to be modified
UpdateRegion- The rectangle to copy source image data from
SourceRowPitch- size in bytes of each row of the source image, usually Bpp * SizeX
SourceDepthPitch- size in bytes of each depth slice of the source image, usually Bpp * SizeX * SizeY
SourceData- source image data, starting at the upper left corner of the source rectangle (in same pixel format as texture)

实现了 FDynamicRHI.

◆ RHIVirtualTextureSetFirstMipInMemory()

virtual void FVulkanDynamicRHI::RHIVirtualTextureSetFirstMipInMemory ( FRHITexture2D *  Texture,
uint32  FirstMip 
)
finaloverridevirtual

Function that is used to allocate / free space used for virtual texture mip levels.

Make sure you also update the visible mip levels.

参数
Texture- the texture to update, must have been created with TexCreate_Virtual
FirstMip- the first mip that should be in memory

实现了 FDynamicRHI.

◆ RHIVirtualTextureSetFirstMipVisible()

virtual void FVulkanDynamicRHI::RHIVirtualTextureSetFirstMipVisible ( FRHITexture2D *  Texture,
uint32  FirstMip 
)
finaloverridevirtual

Function that can be used to update which is the first visible mip to the GPU.

参数
Texture- the texture to update, must have been created with TexCreate_Virtual
FirstMip- the first mip that should be visible to the GPU

实现了 FDynamicRHI.


该类的文档由以下文件生成: