XII Release 0.1.0
Loading...
Searching...
No Matches
xiiVirtualShadowMapManager Class Reference

#include <VirtualShadowMap.h>

Static Public Member Functions

static xiiResult Configure (const xiiVirtualShadowMapSettings &settings)
static bool IsSubsystemInitialized ()
static bool IsInitialized ()
static void BeginFrame (xiiUInt64 uiFrameIndex, xiiUInt64 uiCompletedFrame)
static void SubmitFeedback (xiiArrayPtr< const xiiVirtualShadowPageRequest > requests)
 Deduplicates, prioritizes, touches, allocates, and safely evicts pages.
static bool TryGetMapping (const xiiVirtualShadowPageId &page, xiiVirtualShadowPageMapping &out_mapping)
static xiiArrayPtr< const xiiVirtualShadowPageMapping > GetDirtyPages ()
static bool InvalidatePage (const xiiVirtualShadowPageId &page)
static xiiUInt32 InvalidateRegion (xiiUInt32 uiLightId, xiiUInt32 uiMipLevel, const xiiRectU32 &pageRegion)
 Invalidates resident pages inside a virtual page-space rectangle.
static xiiUInt32 InvalidateLight (xiiUInt32 uiLightId)
 Invalidates every resident page owned by one stable light identifier.
static xiiUInt32 InvalidateAll ()
 Invalidates all resident pages, for example after a scene-wide origin shift.
static bool MarkPageRendered (const xiiVirtualShadowRasterTicket &page)
 Reports proven GPU completion, rejecting invalidated/recycled content revisions.
static xiiVirtualShadowMapStats GetStats ()
static const xiiVirtualShadowMapSettings & GetConfiguration ()
static xiiUInt64 GetConfigurationRevision ()
 Transient device residency epoch. Rejects feedback captured before reconfiguration.
static xiiSharedPtr< xiiGALTexture > GetPhysicalAtlas ()
static bool GetPhysicalPageViewport (xiiUInt32 uiPhysicalPage, xiiRectU32 &out_viewport)
 Returns the texel viewport assigned to a physical page.
static bool BuildPageViewProjection (const xiiMat4 &cascadeViewProjection, const xiiVirtualShadowPageId &page, xiiUInt32 uiVirtualResolution, xiiUInt32 uiPageSize, xiiMat4 &out_pageViewProjection)
static xiiSharedPtr< const xiiVirtualShadowTableUpload > CaptureTableUpload (xiiUInt64 uiFrameIndex)
static void RecordTableUpload (xiiSharedPtr< const xiiVirtualShadowTableUpload > upload, xiiSharedPtr< xiiGALFence > completion)
static bool IsTableUploadRecorded (const xiiVirtualShadowTableUpload &upload)
static void GatherRasterPages (xiiArrayPtr< const xiiMat4 > cascadeViewProjections, xiiUInt32 uiLightId, xiiDynamicArray< xiiVirtualShadowRasterPage > &out_pages, xiiUInt32 maxPages=xiiInvalidIndex)
static bool IsRasterWorkCurrent (const xiiVirtualShadowRasterTicket &page)
static xiiSharedPtr< const xiiVirtualShadowPagePublication > CapturePagePublication (xiiSharedPtr< const xiiVirtualShadowTableUpload > upload, xiiArrayPtr< const xiiVirtualShadowRasterPage > pages)
 Pure capture/retirement operations; this device service constructs no render graph.
static void RecordPagePublication (const xiiVirtualShadowPagePublication &publication, xiiSharedPtr< xiiGALFence > completion)

Detailed Description

Process-wide virtual-shadow-map page residency service.

State is allocated by the GraphicsCore subsystem after Foundation startup, avoiding allocator use from global constructors. Owns device page allocations, CPU demand and residency metadata. Feedback and raster algorithms belong to selected pipeline resources. Access is serialized by the existing GPU frame owner.

Member Function Documentation

◆ BeginFrame()

void xiiVirtualShadowMapManager::BeginFrame ( xiiUInt64 uiFrameIndex,
xiiUInt64 uiCompletedFrame )
static

Starts a residency frame. completedFrame is the newest frame whose GPU work has retired; only pages last used by that frame may be evicted.

◆ BuildPageViewProjection()

bool xiiVirtualShadowMapManager::BuildPageViewProjection ( const xiiMat4 & cascadeViewProjection,
const xiiVirtualShadowPageId & page,
xiiUInt32 uiVirtualResolution,
xiiUInt32 uiPageSize,
xiiMat4 & out_pageViewProjection )
staticnodiscard

Crops one cascade view-projection matrix to the requested virtual page. The resulting clip space fills a physical page viewport without changing reversed-Z depth. Exposed for tooling and deterministic validation.

◆ CaptureTableUpload()

xiiSharedPtr< const xiiVirtualShadowTableUpload > xiiVirtualShadowMapManager::CaptureTableUpload ( xiiUInt64 uiFrameIndex)
staticnodiscard

Captures coalesced physical edits and a changed virtual table for the current frame slice. The first capture freezes this device frame; later residency changes are queued for the next frame rather than rewriting tables under active views.

◆ GatherRasterPages()

void xiiVirtualShadowMapManager::GatherRasterPages ( xiiArrayPtr< const xiiMat4 > cascadeViewProjections,
xiiUInt32 uiLightId,
xiiDynamicArray< xiiVirtualShadowRasterPage > & out_pages,
xiiUInt32 maxPages = xiiInvalidIndex )
static

Select a deterministic bounded batch without constructing any raster operations. Selected pages are touched for GPU retirement and claimed once per device frame.

◆ GetPhysicalAtlas()

xiiSharedPtr< xiiGALTexture > xiiVirtualShadowMapManager::GetPhysicalAtlas ( )
staticnodiscard

Persistent depth atlas owned by the subsystem. Consumers import this resource into their render graph but never own or destroy it.

◆ InvalidatePage()

bool xiiVirtualShadowMapManager::InvalidatePage ( const xiiVirtualShadowPageId & page)
staticnodiscard

Marks one resident page dirty after an occluder, light, or projection change. Call before graph setup; the page remains sampleable in the same frame once the selected raster graph and page completion have written the atlas/table.

◆ RecordTableUpload()

void xiiVirtualShadowMapManager::RecordTableUpload ( xiiSharedPtr< const xiiVirtualShadowTableUpload > upload,
xiiSharedPtr< xiiGALFence > completion )
static

Register a recorded transfer. Dirty edits retire only after its fence signals; abandoned/failed recordings remain retryable after shared frame retirement.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Lighting/VirtualShadowMap.h
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Lighting/Implementation/VirtualShadowMap.cpp