Table of Contents

Class DataPool

Namespace
Pinwheel.Vista.Graph
Assembly
Pinwheel.Vista.Runtime.dll

Owns the transient render textures and compute buffers created during graph execution.

public class DataPool : IDisposable
Inheritance
DataPool
Implements
Inherited Members

Remarks

A DataPool is attached to one execution flow and is shared through GraphContext. Nodes request textures and buffers from it by slot name, release references when they no longer need an input, and let the pool recycle resources whose reference count has reached zero.

Constructors

DataPool()

Creates an empty pool for one graph execution flow.

Methods

CreateBuffer(BufferDescriptor, SlotRef, bool)

Returns a compute buffer and binds it to the identifier derived from a slot reference.

CreateBuffer(BufferDescriptor, string, bool)

Returns a compute buffer matching the requested descriptor and binds it to a pool identifier.

CreateRenderTarget(RtDescriptor, SlotRef, bool)

Returns a render texture and binds it to the identifier derived from a slot reference.

CreateRenderTarget(RtDescriptor, string, bool)

Returns a render texture matching the requested descriptor and binds it to a pool identifier.

CreateTemporaryBuffer(BufferDescriptor, string, bool)

Creates or reuses a temporary compute buffer that is protected from immediate pool reuse.

CreateTemporaryRT(RtDescriptor, string, bool)

Creates or reuses a temporary render texture that is protected from immediate pool reuse.

Dispose()

Disposes every resource still owned by the pool.

DisposeUnused()

Disposes resources that no longer have active references.

~DataPool()
GetBuffer(SlotRef)

Looks up a pooled compute buffer by slot reference.

GetBuffer(string)

Looks up a pooled compute buffer by identifier.

GetMemoryStats()

Calculates an approximate memory snapshot for the resources currently retained by the pool.

GetName(string, int)

Builds the canonical pool identifier used for a node output slot.

GetRT(SlotRef)

Looks up a pooled render texture by slot reference.

GetRT(string)

Looks up a pooled render texture by identifier.

GetReferenceCount(string)

Returns the tracked reference count for a pooled resource.

GetUsageCount(SlotRef)

Returns the tracked reference count for the resource bound to a slot reference.

ReleaseReference(SlotRef)

Decrements the recorded reference count for the resource bound to a slot reference.

ReleaseReference(string)

Decrements the recorded reference count for a pooled resource.

RemoveBufferFromPool(SlotRef)

Detaches a compute buffer from the pool by slot reference.

RemoveBufferFromPool(string)

Detaches a compute buffer from the pool and returns ownership to the caller.

RemoveRTFromPool(SlotRef)

Detaches a render texture from the pool by slot reference.

RemoveRTFromPool(string)

Detaches a render texture from the pool and returns ownership to the caller.