Foundation
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
Foundation::Rendering Namespace Reference

Reference implementations of real-time rendering routines. More...

Classes

struct  ApplicationInitDesc
 Initialization parameters for RenderApplication. More...
 
class  GPUScene
 Scene data management for asynchronous data updates/uploads on the GPU. More...
 
struct  GPUSceneBudgets
 
class  RenderApplication
 Template base class for rendering applications. More...
 
class  StagedBuffer
 Helper class for GPU buffer updates. More...
 
class  StagingBuffer
 Bump-only allocation buffer used for staging data to be transferred to GPU. More...
 
class  TexturePool
 Bindless Texture Pool implementation. More...
 
class  UploadContext
 Deferred upload context for transferring data to GPU resources. More...
 
class  VirtualAllocator
 Thread-safe wrapper around VulkanMemoryAllocator's Virtual Allocator interface. More...
 

Typedefs

using BufferStagingItem = Tuple< RHIBuffer *, RHIBuffer *, RHICommandList::CopyBufferRegion >
 
using BufferStagingList = Vector< BufferStagingItem >
 
using BufferCopyList = Vector< RHICommandList::CopyBufferRegion >
 
using TexturePoolHandle = uint32_t
 
using TexturePair = Pair< RHIDeviceScopedObjectHandle< RHITexture >, RHITextureScopedHandle< RHITextureView > >
 
using VirtualAllocation = uint32_t
 

Functions

void createCSMipGenerationPasses (Renderer *renderer, StringView name, RHIDeviceQueueType queue, ResourceHandle src, ResourceHandle dst, RHITextureAspectFlagBits srcAspect, RHIResourceFormat srcFormat, RHITextureAspectFlagBits dstAspect, RHIResourceFormat dstFormat, uint32_t maxMips=16, uint32_t layer=0)
 
template<typename FSetup , typename FRecord >
autocreatePSFullscreenPass (Renderer *r, StringView name, FSetup &&setup, FRecord &&record)
 Creates a full-screen triangle pass that writes to the current backbuffer.
 
template<typename FSetup >
autocreatePSFullscreenPass (Renderer *r, StringView name, FSetup &&setup)
 
autocreatePSBackbufferBlitPass (Renderer *r, StringView name, ResourceHandle copy_sampler, ResourceHandle copy_source, RHIResourceFormat srcFormat=RHIResourceFormat::R8G8B8A8Unorm)
 Creates a full-screen triangle pass that renders a texture to the current backbuffer.
 
BufferStagingListCoalesceBufferStaging (BufferStagingList &res)
 Two-pointers in-place coalescing of copy regions.
 

Variables

constexpr TexturePoolHandle kInvalidTexturePoolHandle = ~0u
 
constexpr VirtualAllocation kInvalidVirtualAllocation = ~0u
 

Detailed Description

Reference implementations of real-time rendering routines.

Typedef Documentation

◆ BufferCopyList

◆ BufferStagingItem

◆ BufferStagingList

◆ TexturePair

◆ TexturePoolHandle

◆ VirtualAllocation

Function Documentation

◆ CoalesceBufferStaging()

BufferStagingList & Foundation::Rendering::CoalesceBufferStaging ( BufferStagingList res)

Two-pointers in-place coalescing of copy regions.

O(N log N) due to sorting. Though N should be quite small in practice as we'd also coalesce neighboring transfers on-the-fly in StagedBuffer::Transfer

Drivers may do this too - but we can't rely on it, plus pushing copy commands in itself has quite some overhead.

◆ createCSMipGenerationPasses()

void Foundation::Rendering::createCSMipGenerationPasses ( Renderer renderer,
StringView  name,
RHIDeviceQueueType  queue,
ResourceHandle  src,
ResourceHandle  dst,
RHITextureAspectFlagBits  srcAspect,
RHIResourceFormat  srcFormat,
RHITextureAspectFlagBits  dstAspect,
RHIResourceFormat  dstFormat,
uint32_t  maxMips = 16,
uint32_t  layer = 0 
)
inline

◆ createPSBackbufferBlitPass()

auto * Foundation::Rendering::createPSBackbufferBlitPass ( Renderer r,
StringView  name,
ResourceHandle  copy_sampler,
ResourceHandle  copy_source,
RHIResourceFormat  srcFormat = RHIResourceFormat::R8G8B8A8Unorm 
)
inline

Creates a full-screen triangle pass that renders a texture to the current backbuffer.

◆ createPSFullscreenPass() [1/2]

template<typename FSetup >
auto * Foundation::Rendering::createPSFullscreenPass ( Renderer r,
StringView  name,
FSetup &&  setup 
)

◆ createPSFullscreenPass() [2/2]

auto * Foundation::Rendering::createPSFullscreenPass ( Renderer r,
StringView  name,
FSetup &&  setup,
FRecord &&  record 
)

Creates a full-screen triangle pass that writes to the current backbuffer.

Parameters
setupis called once during setup phase of the pass, after a fullscreen vertex stage is bound.
recordis called once per frame during execution phase of the pass, after the pipeline is set.

Variable Documentation

◆ kInvalidTexturePoolHandle

constexpr TexturePoolHandle Foundation::Rendering::kInvalidTexturePoolHandle = ~0u
constexpr

◆ kInvalidVirtualAllocation

constexpr VirtualAllocation Foundation::Rendering::kInvalidVirtualAllocation = ~0u
constexpr