|
Foundation
|
Classes | |
| struct | BlobCopyTask |
| struct | DynamicTextureGPUUpdate |
| struct | DynamicTextureUpload |
| struct | Geometry |
| struct | PendingBufferUpload |
| struct | PendingGeometryUpload |
| struct | PendingTextureUpload |
| struct | Texture |
| struct | UploadBatchState |
Public Types | |
| enum class | ResourceState : uint8_t { Queued , Uploading , Ready , Failed } |
| using | Result = GPUScene::Result |
| using | UpdateResult = GPUScene::UpdateResult |
| using | GPUSceneTables = GPUScene::GPUSceneTables |
| using | MemoryStat = GPUScene::MemoryStat |
| using | TLASBuildResult = GPUScene::TLASBuildResult |
Public Member Functions | |
| void | EnsureTLASCapacity (uint32_t totalInstances) |
| uint32_t | CountLiveInstances () const |
| uint32_t | CountTLASInstances () const |
| Geometry * | ResolveGeometry (GeometryHandle handle) |
| Geometry const * | ResolveGeometry (GeometryHandle handle) const |
| void | FreeGeometry (uint32_t slot) |
| Vector< Texture > & | TextureSlots (bool is3D) |
| Vector< Texture > const & | TextureSlots (bool is3D) const |
| BindlessPool & | TexturePool (bool is3D) |
| BindlessPool const & | TexturePool (bool is3D) const |
| void | FreeTextureSlot (bool is3D, uint32_t slot) |
| BindlessPool & | SelectTexturePool (RHITextureDimension viewDimension) |
| BindlessPool const & | SelectTexturePool (RHITextureDimension viewDimension) const |
| template<typename T > | |
| void | EnqueueUpload (MPMCQueue< T > &queue, T &&item) |
| bool | UploadBatchBegin () |
| bool | UploadBatchMoveNext (size_t timeout) |
| void | PrepareUploads (UploadBatchState &state) |
| void | DecodeUploads (UploadBatchState &state, size_t begin, size_t end, JobContext &context) |
| void | SubmitUploads (UploadBatchState &state) |
| void | UploadBatchEnd (UploadBatchState &state) |
| void | SubmitBLAS (UploadBatchState &state, ImmediateSubmitDesc const &submitDesc) |
| void | SubmitBLASCompaction (UploadBatchState &state) |
| Result | ReserveMesh (FSerializedMesh const &src, GSMesh &outHeader, uint32_t &outOffset) |
| Result | ReserveCurve (FSerializedCurve const &src, GSCurveSet &outHeader, uint32_t &outOffset) |
| size_t | StageMesh (ImmediateUpload::UploadBatch *batch, FSerializedMesh const &src, GSMesh const &header, uint32_t offset, Vector< BlobCopyTask > &outWrites) |
| size_t | StageCurve (ImmediateUpload::UploadBatch *batch, FSerializedCurve const &src, GSCurveSet const &header, uint32_t offset, Vector< BlobCopyTask > &outWrites) |
| size_t | StageTextureSubresource (ImmediateUpload::UploadBatch *batch, FSerializedTexture const &source, RHITexture *texture, uint32_t layer, uint32_t mip, Vector< BlobCopyTask > &outWrites) |
| void | FlushDirectGeometryUpload () |
| Span< GSInstance > | AllocateInstance (uint32_t count, uint32_t &outOffset) |
| Span< GSMaterial > | AllocateMaterial (uint32_t count, uint32_t &outOffset) |
| Span< GSLight > | AllocateLight (uint32_t count, uint32_t &outOffset) |
| GPUSceneImpl (GPUScene &owner, RHIDevice *device, JobSystem *jobs, Allocator *allocator, GPUSceneDesc const &desc, AllocatorStack *frameScratch) | |
| ~GPUSceneImpl () | |
| Result | Upload (FBlobDeserializer *blobs, FSerializedMesh const &source, GeometryHandle &outHandle) |
| Result | Upload (FImportedMesh const &source, GeometryHandle &outHandle) |
| Result | Allocate (uint32_t vertexCount, uint32_t indexCount, GeometryHandle &outHandle, bool isGpu) |
| Result | Allocate (uint32_t vertexCount, uint32_t indexCount, uint32_t leafCount, GeometryHandle &outHandle, bool isGpu) |
| Result | Allocate (RHITextureDesc const &desc, const char *debugName, TextureHandle &outHandle, bool isGpu) |
| Result | Upload (FBlobDeserializer *blobs, FSerializedCurve const &source, GeometryHandle &outHandle) |
| Result | Upload (FBlobDeserializer *blobs, FSerializedTexture const &source, TextureHandle &outTexture, const char *debugName=nullptr, bool pinned=false) |
| Result | Upload (FTexture const &source, TextureHandle &outTexture, const char *debugName=nullptr, bool pinned=false) |
| Result | UploadEnvironmentMap (FTexture const &source) |
| Result | Upload (RHIBuffer *dst, Span< const unsigned char > data, uint32_t dstOffset=0) |
| Result | Query (GeometryHandle handle) const |
| Result | Query (TextureHandle texture) const |
| void | Join () |
| Result | Poll (size_t timeout) |
| GPUSceneTables | BeginScene (uint32_t instanceCount, uint32_t materialCount, uint32_t lightCount) |
| UpdateResult | EndScene (GPUSceneTables &tables) |
| void | DbgGetMemoryStatistics (Vector< MemoryStat > &outStats) const |
| String | DbgGetBufferStatistics () const |
| TLASBuildResult | BuildTLAS (RHICommandList *cmd, bool update) |
| void | Collect () |
| void | Reset () |
| uint32_t | AllocateDynamicStaging (uint32_t size, uint32_t alignment) |
| void | AllocateDynamicBLAS (Geometry &g) |
| bool | HasDynamicGeometry () const |
| bool | HasDynamicTextures () const |
| bool | HasCurveGeometry () const |
| void | BeginDynamicUpdate () |
| void | UpdateDynamicMeshGPU (GeometryHandle handle, bool updateVertices, bool updateIndices) |
| void | UpdateDynamicCurveGPU (GeometryHandle handle, bool updateVertices, bool updateIndices, bool updateLeaves) |
| void | UpdateDynamicMeshCPU (GeometryHandle handle, Span< const FQVertex > vertices, Span< const uint32_t > indices) |
| void | UpdateDynamicCurveCPU (GeometryHandle handle, Span< const FCurveDOTSVertex > vertices, Span< const uint32_t > indices, Span< const FCurveLeaf > leaves) |
| void | UpdateDynamicTextureCPU (TextureHandle handle, FTexture const &source) |
| uint32_t | UpdateDynamicTextureGPU (TextureHandle handle, GPUScene::DynamicTextureGPUAccess access) |
| void | EndDynamicUpdate () |
| void | UploadDynamicGeometryCPU (RHICommandList *cmd) |
| void | UploadDynamicTexturesCPU (RHICommandList *cmd) |
| void | BeginDynamicTextureGPU (RHICommandList *cmd, bool is3D, GPUScene::GPUScene::DynamicTextureGPUAccess access) |
| void | EndDynamicTextureGPU (RHICommandList *cmd, bool is3D, GPUScene::DynamicTextureGPUAccess access) |
| RHITexture * | ResolveDynamicTextureGPU (TextureHandle handle, RHITextureUsage requiredUsage) |
| void | CompleteDynamicTextureGPU (TextureHandle handle, GPUScene::DynamicTextureGPUAccess access) |
| void | BuildBLAS (RHICommandList *cmd) |
| using GPUSceneImpl::Result = GPUScene::Result |
|
strong |
| GPUSceneImpl::GPUSceneImpl | ( | GPUScene & | owner, |
| RHIDevice * | device, | ||
| JobSystem * | jobs, | ||
| Allocator * | allocator, | ||
| GPUSceneDesc const & | desc, | ||
| AllocatorStack * | frameScratch | ||
| ) |
| GPUSceneImpl::~GPUSceneImpl | ( | ) |
| GPUScene::Result GPUSceneImpl::Allocate | ( | RHITextureDesc const & | desc, |
| const char * | debugName, | ||
| TextureHandle & | outHandle, | ||
| bool | isGpu | ||
| ) |
| GPUScene::Result GPUSceneImpl::Allocate | ( | uint32_t | vertexCount, |
| uint32_t | indexCount, | ||
| GeometryHandle & | outHandle, | ||
| bool | isGpu | ||
| ) |
| GPUScene::Result GPUSceneImpl::Allocate | ( | uint32_t | vertexCount, |
| uint32_t | indexCount, | ||
| uint32_t | leafCount, | ||
| GeometryHandle & | outHandle, | ||
| bool | isGpu | ||
| ) |
| void GPUSceneImpl::AllocateDynamicBLAS | ( | Geometry & | g | ) |
| uint32_t GPUSceneImpl::AllocateDynamicStaging | ( | uint32_t | size, |
| uint32_t | alignment | ||
| ) |
| Span< GSInstance > GPUSceneImpl::AllocateInstance | ( | uint32_t | count, |
| uint32_t & | outOffset | ||
| ) |
| Span< GSMaterial > GPUSceneImpl::AllocateMaterial | ( | uint32_t | count, |
| uint32_t & | outOffset | ||
| ) |
| void GPUSceneImpl::BeginDynamicTextureGPU | ( | RHICommandList * | cmd, |
| bool | is3D, | ||
| GPUScene::GPUScene::DynamicTextureGPUAccess | access | ||
| ) |
| void GPUSceneImpl::BeginDynamicUpdate | ( | ) |
| GPUScene::GPUSceneTables GPUSceneImpl::BeginScene | ( | uint32_t | instanceCount, |
| uint32_t | materialCount, | ||
| uint32_t | lightCount | ||
| ) |
| void GPUSceneImpl::BuildBLAS | ( | RHICommandList * | cmd | ) |
| GPUScene::TLASBuildResult GPUSceneImpl::BuildTLAS | ( | RHICommandList * | cmd, |
| bool | update | ||
| ) |
| void GPUSceneImpl::Collect | ( | ) |
| void GPUSceneImpl::CompleteDynamicTextureGPU | ( | TextureHandle | handle, |
| GPUScene::DynamicTextureGPUAccess | access | ||
| ) |
| uint32_t GPUSceneImpl::CountLiveInstances | ( | ) | const |
| uint32_t GPUSceneImpl::CountTLASInstances | ( | ) | const |
| String GPUSceneImpl::DbgGetBufferStatistics | ( | ) | const |
| void GPUSceneImpl::DbgGetMemoryStatistics | ( | Vector< MemoryStat > & | outStats | ) | const |
| void GPUSceneImpl::DecodeUploads | ( | UploadBatchState & | state, |
| size_t | begin, | ||
| size_t | end, | ||
| JobContext & | context | ||
| ) |
| void GPUSceneImpl::EndDynamicTextureGPU | ( | RHICommandList * | cmd, |
| bool | is3D, | ||
| GPUScene::DynamicTextureGPUAccess | access | ||
| ) |
| void GPUSceneImpl::EndDynamicUpdate | ( | ) |
| GPUScene::UpdateResult GPUSceneImpl::EndScene | ( | GPUSceneTables & | tables | ) |
| void GPUSceneImpl::EnqueueUpload | ( | MPMCQueue< T > & | queue, |
| T && | item | ||
| ) |
| void GPUSceneImpl::EnsureTLASCapacity | ( | uint32_t | totalInstances | ) |
| void GPUSceneImpl::FlushDirectGeometryUpload | ( | ) |
| void GPUSceneImpl::FreeGeometry | ( | uint32_t | slot | ) |
| void GPUSceneImpl::FreeTextureSlot | ( | bool | is3D, |
| uint32_t | slot | ||
| ) |
|
inline |
|
inline |
|
inline |
| void GPUSceneImpl::Join | ( | ) |
| GPUScene::Result GPUSceneImpl::Poll | ( | size_t | timeout | ) |
| void GPUSceneImpl::PrepareUploads | ( | UploadBatchState & | state | ) |
| GPUScene::Result GPUSceneImpl::Query | ( | GeometryHandle | handle | ) | const |
| GPUScene::Result GPUSceneImpl::Query | ( | TextureHandle | texture | ) | const |
| GPUScene::Result GPUSceneImpl::ReserveCurve | ( | FSerializedCurve const & | src, |
| GSCurveSet & | outHeader, | ||
| uint32_t & | outOffset | ||
| ) |
| GPUScene::Result GPUSceneImpl::ReserveMesh | ( | FSerializedMesh const & | src, |
| GSMesh & | outHeader, | ||
| uint32_t & | outOffset | ||
| ) |
| void GPUSceneImpl::Reset | ( | ) |
| RHITexture * GPUSceneImpl::ResolveDynamicTextureGPU | ( | TextureHandle | handle, |
| RHITextureUsage | requiredUsage | ||
| ) |
| GPUSceneImpl::Geometry * GPUSceneImpl::ResolveGeometry | ( | GeometryHandle | handle | ) |
| GPUSceneImpl::Geometry const * GPUSceneImpl::ResolveGeometry | ( | GeometryHandle | handle | ) | const |
| BindlessPool & GPUSceneImpl::SelectTexturePool | ( | RHITextureDimension | viewDimension | ) |
| BindlessPool const & GPUSceneImpl::SelectTexturePool | ( | RHITextureDimension | viewDimension | ) | const |
| size_t GPUSceneImpl::StageCurve | ( | ImmediateUpload::UploadBatch * | batch, |
| FSerializedCurve const & | src, | ||
| GSCurveSet const & | header, | ||
| uint32_t | offset, | ||
| Vector< BlobCopyTask > & | outWrites | ||
| ) |
| size_t GPUSceneImpl::StageMesh | ( | ImmediateUpload::UploadBatch * | batch, |
| FSerializedMesh const & | src, | ||
| GSMesh const & | header, | ||
| uint32_t | offset, | ||
| Vector< BlobCopyTask > & | outWrites | ||
| ) |
| size_t GPUSceneImpl::StageTextureSubresource | ( | ImmediateUpload::UploadBatch * | batch, |
| FSerializedTexture const & | source, | ||
| RHITexture * | texture, | ||
| uint32_t | layer, | ||
| uint32_t | mip, | ||
| Vector< BlobCopyTask > & | outWrites | ||
| ) |
| void GPUSceneImpl::SubmitBLAS | ( | UploadBatchState & | state, |
| ImmediateSubmitDesc const & | submitDesc | ||
| ) |
| void GPUSceneImpl::SubmitBLASCompaction | ( | UploadBatchState & | state | ) |
| void GPUSceneImpl::SubmitUploads | ( | UploadBatchState & | state | ) |
|
inline |
|
inline |
| void GPUSceneImpl::UpdateDynamicCurveCPU | ( | GeometryHandle | handle, |
| Span< const FCurveDOTSVertex > | vertices, | ||
| Span< const uint32_t > | indices, | ||
| Span< const FCurveLeaf > | leaves | ||
| ) |
| void GPUSceneImpl::UpdateDynamicCurveGPU | ( | GeometryHandle | handle, |
| bool | updateVertices, | ||
| bool | updateIndices, | ||
| bool | updateLeaves | ||
| ) |
| void GPUSceneImpl::UpdateDynamicMeshCPU | ( | GeometryHandle | handle, |
| Span< const FQVertex > | vertices, | ||
| Span< const uint32_t > | indices | ||
| ) |
| void GPUSceneImpl::UpdateDynamicMeshGPU | ( | GeometryHandle | handle, |
| bool | updateVertices, | ||
| bool | updateIndices | ||
| ) |
| void GPUSceneImpl::UpdateDynamicTextureCPU | ( | TextureHandle | handle, |
| FTexture const & | source | ||
| ) |
| uint32_t GPUSceneImpl::UpdateDynamicTextureGPU | ( | TextureHandle | handle, |
| GPUScene::DynamicTextureGPUAccess | access | ||
| ) |
| GPUScene::Result GPUSceneImpl::Upload | ( | FBlobDeserializer * | blobs, |
| FSerializedCurve const & | source, | ||
| GeometryHandle & | outHandle | ||
| ) |
| GPUScene::Result GPUSceneImpl::Upload | ( | FBlobDeserializer * | blobs, |
| FSerializedMesh const & | source, | ||
| GeometryHandle & | outHandle | ||
| ) |
| GPUScene::Result GPUSceneImpl::Upload | ( | FBlobDeserializer * | blobs, |
| FSerializedTexture const & | source, | ||
| TextureHandle & | outTexture, | ||
| const char * | debugName = nullptr, |
||
| bool | pinned = false |
||
| ) |
| GPUScene::Result GPUSceneImpl::Upload | ( | FImportedMesh const & | source, |
| GeometryHandle & | outHandle | ||
| ) |
| GPUScene::Result GPUSceneImpl::Upload | ( | FTexture const & | source, |
| TextureHandle & | outTexture, | ||
| const char * | debugName = nullptr, |
||
| bool | pinned = false |
||
| ) |
| GPUScene::Result GPUSceneImpl::Upload | ( | RHIBuffer * | dst, |
| Span< const unsigned char > | data, | ||
| uint32_t | dstOffset = 0 |
||
| ) |
| bool GPUSceneImpl::UploadBatchBegin | ( | ) |
| void GPUSceneImpl::UploadBatchEnd | ( | UploadBatchState & | state | ) |
| bool GPUSceneImpl::UploadBatchMoveNext | ( | size_t | timeout | ) |
| void GPUSceneImpl::UploadDynamicGeometryCPU | ( | RHICommandList * | cmd | ) |
| void GPUSceneImpl::UploadDynamicTexturesCPU | ( | RHICommandList * | cmd | ) |
| GPUScene::Result GPUSceneImpl::UploadEnvironmentMap | ( | FTexture const & | source | ) |
| UniquePtr<UploadBatchState> GPUSceneImpl::mActiveUpload |
| Allocator* GPUSceneImpl::mAllocator {GLOBAL_ALLOC} |
| Vector<RHIDeviceScopedHandle<RHIBuffer> > GPUSceneImpl::mBLASBuffers |
| Vector<RHIDeviceScopedHandle<RHIAccelerationStructure> > GPUSceneImpl::mBLASes |
| Vector<uint32_t> GPUSceneImpl::mBLASFreelist |
| Vector<RHIDeviceScopedHandle<RHIBuffer> > GPUSceneImpl::mCurveBLASBuffers |
| Vector<RHIDeviceScopedHandle<RHIAccelerationStructure> > GPUSceneImpl::mCurveBLASes |
| Vector<uint32_t> GPUSceneImpl::mCurveBLASFreelist |
| RHIDevice* GPUSceneImpl::mDevice {nullptr} |
| bool GPUSceneImpl::mDirectGeometryUpload {false} |
| RHIDeviceScopedHandle<RHIAccelerationStructure> GPUSceneImpl::mDiskBLAS |
| Vector<uint32_t> GPUSceneImpl::mDynamicGeometries |
| bool GPUSceneImpl::mDynamicIsUpdate {false} |
| RHIDeviceScopedHandle<RHIVirtualAllocator> GPUSceneImpl::mDynamicPrimitiveAlloc |
| RHIDeviceScopedHandle<RHIBuffer> GPUSceneImpl::mDynamicPrimitiveBuffer |
| RHIDeviceScopedHandle<RHIBuffer> GPUSceneImpl::mDynamicStagingBuffer |
| uint32_t GPUSceneImpl::mDynamicStagingCursor {0} |
| uint32_t GPUSceneImpl::mDynamicStagingFrameIndex {0} |
| uint32_t GPUSceneImpl::mDynamicStagingFrames {0} |
| uint32_t GPUSceneImpl::mDynamicStagingFrameSize {0} |
| char* GPUSceneImpl::mDynamicStagingMapped {nullptr} |
| Vector<DynamicTextureGPUUpdate> GPUSceneImpl::mDynamicTextureGPUUpdates |
| Vector<uint32_t> GPUSceneImpl::mDynamicTextures |
| Vector<DynamicTextureUpload> GPUSceneImpl::mDynamicTextureUploads |
| Vector<RHICommandList::CopyBufferRegion> GPUSceneImpl::mDynamicUploadRegions |
| UploadGPURingBuffer<GSEmissiveCluster> GPUSceneImpl::mEmissiveClusterBuffer |
| Vector<uint32_t> GPUSceneImpl::mGeometryFreelist |
| UniquePtr<ImmediateUpload> GPUSceneImpl::mImmediateUpload |
| size_t GPUSceneImpl::mImmediateUploadCapacity {} |
| UploadGPURingBuffer<GSInstance> GPUSceneImpl::mInstanceBuffer |
| JobSystem* GPUSceneImpl::mJobs {nullptr} |
| uint32_t GPUSceneImpl::mLastRebuildCount {0} |
| uint32_t GPUSceneImpl::mLastRefitCount {0} |
| RHIDeviceScopedHandle<RHIBuffer> GPUSceneImpl::mLightBLASBuffer |
| UploadGPURingBuffer<GSLight> GPUSceneImpl::mLightBuffer |
| UploadGPURingBuffer<uint2> GPUSceneImpl::mLightBVHBitmaskBuffer |
| UploadGPURingBuffer<uint32_t> GPUSceneImpl::mLightBVHGlobalIndexBuffer |
| UploadGPURingBuffer<uint32_t> GPUSceneImpl::mLightBVHLightIndexBuffer |
| bool GPUSceneImpl::mLightBVHNeedsRefit {false} |
| UploadGPURingBuffer<GSLightBVHNode> GPUSceneImpl::mLightBVHNodeBuffer |
| UploadGPURingBuffer<uint32_t> GPUSceneImpl::mLightBVHNodeIndexBuffer |
| Vector<LightBVHRefitLevel> GPUSceneImpl::mLightBVHRefitLevels |
| RHIDeviceScopedHandle<RHIBuffer> GPUSceneImpl::mLightGeometryBuffer |
| UploadGPURingBuffer<GSMaterial> GPUSceneImpl::mMaterialBuffer |
| uint32_t GPUSceneImpl::mMeshletGlobalCounter {0} |
| RHIDeviceScopedHandle<RHIVirtualAllocator> GPUSceneImpl::mPrimitiveAlloc |
| char* GPUSceneImpl::mPrimitiveMapped {nullptr} |
| RHIDeviceScopedHandle<RHIAccelerationStructure> GPUSceneImpl::mRectBLAS |
| RHIDeviceScopedHandle<RHIBuffer> GPUSceneImpl::mScratchBufferTLAS |
| RHIDeviceScopedHandle<RHIAccelerationStructure> GPUSceneImpl::mSphereBLAS |
| AllocatorStack* GPUSceneImpl::mStackAlloc {nullptr} |
| BindlessPool GPUSceneImpl::mTexture2DPool |
| BindlessPool GPUSceneImpl::mTexture3DPool |
| RHIDeviceScopedHandle<RHIBuffer> GPUSceneImpl::mTLASBuffer |
| UploadGPURingBuffer<char> GPUSceneImpl::mTLASInstances |
| uint32_t GPUSceneImpl::mTLASInstanceStride {0} |
| MPMCQueue<PendingBufferUpload> GPUSceneImpl::mUploadBufferQueue |
| Mutex GPUSceneImpl::mUploadDriveMutex |
| MPMCQueue<PendingGeometryUpload> GPUSceneImpl::mUploadGeometryQueue |
| Atomic<size_t> GPUSceneImpl::mUploadPending {0} |
|
mutable |
| MPMCQueue<PendingTextureUpload> GPUSceneImpl::mUploadTextureQueue |
| GPUScene& GPUSceneImpl::owner |