The interface which is implemented by the dynamically bound RHI. 更多...
#include <DynamicRHI.h>
类 FDynamicRHI 继承关系图:Public 成员函数 | |
| 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. | |
The interface which is implemented by the dynamically bound RHI.
|
virtual |
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.
| RHICmdList | The command-list to execute on or synchronize with. |
| StagingBuffer | The buffer to lock. |
| Fence | An optional fence synchronized with the last buffer update. |
| Offset | The offset in the buffer to return. |
| SizeRHI | The length of the region in the buffer to lock. |
被 FOpenGLDynamicRHI 重载.
|
pure virtual |
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 |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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). |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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. |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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. |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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. |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
virtual |
Computes the total size of a virtual memory (VM) based 2D texture with the specified parameters.
| Mip0Width | - width of the top mip |
| Mip0Height | - height of the top mip |
| Format | - EPixelFormat texture format |
| NumMips | - number of mips the texture has |
| FirstMipIdx | - index of the first resident mip |
| NumSamples | - number of MSAA samples, usually 1 |
| Flags | - ETextureCreateFlags creation flags |
| OutAlign | - Alignment required for this texture. Output parameter. |
|
pure virtual |
Cancels an async reallocation for the specified texture.
This should be called for the new texture, not the original.
| Texture | Texture to cancel |
| bBlockUntilCompleted | If true, blocks until the cancellation is fully completed |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
Computes the size in memory required by a given texture.
| TextureRHI | - Texture we want to know the size of, 0 is safely ignored |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
Copies the contents of one vertex buffer to another vertex buffer.
They must have identical sizes.
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FNullDynamicRHI, FVulkanDynamicRHI , 以及 FOpenGLDynamicRHI 内被实现.
|
inline |
Creates a compute fence.
Compute fences are named GPU fences which can be written to once before resetting. A command to write the fence must be enqueued before any commands to wait on them. This is enforced on the CPU to avoid GPU hangs.
| Name | - Friendly name for the Fence. e.g. ReflectionEnvironmentComplete |
|
inlinevirtual |
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. |
被 FVulkanDynamicRHI 重载.
|
inlinevirtual |
Creates a pool for querys like timers or occlusion queries.
| QueryType | The ype of the queries provided by this pool like RQT_Occlusion or RQT_AbsoluteTime. |
被 FOpenGLDynamicRHI 重载.
|
inlinevirtual |
Attempts to open a shader library for the given shader platform & name within the provided directory.
| Platform | The shader platform for shaders withing the library. |
| FilePath | The directory in which the library should exist. |
| Name | The name of the library, i.e. "Global" or "Unreal" without shader-platform or file-extension qualification. |
|
inlinevirtual |
Creates a staging buffer, which is memory visible to the cpu without any locking.
被 FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 重载.
|
pure virtual |
| ResourceArray | - An optional pointer to a resource array containing the resource's data. |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
inlinevirtual |
Creates a 2D RHI texture external 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 |
被 FOpenGLDynamicRHI 重载.
|
pure virtual |
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. |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
| ResourceArray | - An optional pointer to a resource array containing the resource's data. |
在 FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
Retrieve available screen resolutions.
| Resolutions | TArray<FScreenResolutionRHI> parameter that will be filled in. |
| bIgnoreRefreshRate | If true, ignore refresh rates. |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
virtual |
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. |
被 FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 重载.
|
pure virtual |
Provides access to the native device.
Generally this should be avoided but is useful for third party plugins.
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
Provides access to the native instance.
Generally this should be avoided but is useful for third party plugins.
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
| Ref | may be 0 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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. |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
Retrieves texture memory stats.
safe to call on the main thread
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
Fills a texture with to visualize the texture pool memory.
| TextureData | Start address |
| SizeX | Number of pixels along X |
| SizeY | Number of pixels along Y |
| Pitch | Number of bytes between each row |
| PixelSize | Number of bytes each pixel represents |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
virtual |
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.
| StagingBuffer | The buffer to lock. |
| Fence | An optional fence synchronized with the last buffer update. |
| Offset | The offset in the buffer to return. |
| SizeRHI | The length of the region in the buffer to lock. |
被 FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 重载.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
virtual |
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 |
被 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 重载.
|
inlinevirtual |
Synchronizes the content of a texture resource between two GPUs using a copy operation.
| Texture | - the texture to synchronize. |
| Rect | - the rectangle area to update. |
| SrcGPUIndex | - the index of the gpu which content will be red from |
| DestGPUIndex | - the index of the gpu which content will be updated. |
| PullData | - whether the source writes the data to the dest, or the dest reads the data from the source. |
|
virtual |
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 |
被 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 重载.
|
virtual |
Unlock a staging buffer previously locked with RHILockStagingBuffer.
| StagingBuffer | The buffer that was previously locked. |
被 FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 重载.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
inlinevirtual |
Updates a region of a 2D texture from GPU memory provided by the given buffer (may not be implemented on every platform)
| 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 |
| Buffer,BufferOffset | - source image data, starting at the upper left corner of the source rectangle (in same pixel format as texture) |
|
pure virtual |
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) |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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) |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
pure virtual |
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 |
在 FEmptyDynamicRHI, FNullDynamicRHI, FOpenGLDynamicRHI , 以及 FVulkanDynamicRHI 内被实现.
|
virtual |
Unlock a staging buffer previously locked with LockStagingBuffer_RenderThread.
| RHICmdList | The command-list to execute on or synchronize with. |
| StagingBuffer | The buffer what was previously locked. |
被 FOpenGLDynamicRHI 重载.