class Enlighten CpuWorker

This is the documentation for Enlighten.

class Enlighten CpuWorker

class Enlighten::CpuWorker

    └>Enlighten::BaseWorker
        └>Enlighten::IUpdateManagerWorker

Implementation of the worker class, containing functionality common to all platforms which solve radiosity on a CPU or SPU.

Variables

Name

Description

Name

Description

Geo::RingBuffer m_CommandBuffer

Buffer of enqueued commands.

Geo::s64 m_CommandThreadTicks

Time taken to execute commands on the command thread.

Geo::GeoKeyValueArray< Geo::GeoGuid, BaseCubeMap > m_CubeMapArray

Cube map GUID to data mapping.

eOutputFormat m_CubemapOutputFormat

Cubemap output format (immutable)

Geo::GeoCriticalSection m_DestroyArrayCriticalSection

Critical section for modifying the to-be-destroyed array.

Geo::GeoKeyValueArray< Geo::GeoGuid, UpdateManagerLight > m_DirectionalLights

Array of directional lights.

Geo::GeoMap< Geo::u32, DirectionPalette * > m_DirectionPalettes

Map of DirectionPalettes for use with EPSS.

Geo::GeoKeyValueArray< Geo::GeoGuid, BaseDynamicObject > m_DynamicObjectArray

Dynamic object GUID to data mapping.

Geo::GeoKeyValueArray< Geo::GeoGuid, BaseEnvironment > m_EnvironmentArray

Environment GUID to data mapping.

Geo::GeoEvent m_ExecuteCommandEvent

Handle to event trigger to execute commands.

UpdateManagerWorkerProperties m_GlobalState

Global solver parameters.

bool m_InputLightingListDirty

Regenerate the hash of the InputLightingList.

Geo::u32 m_InputLightingListHash

Hash of the list of InputLightingBuffers.

PrecisionHint::Value m_InputLightingPrecisionHint

Input lighting precision hint.

Geo::u32 m_InterpolationInputChangeId

Counter incremented when the list of probe inputs is recreated.

bool m_InterpolationInputListRecreated

Flag set when the list of probe inputs was recreated.

Geo::GeoArray< InterpolationInputSet > m_InterpolationInputSets

List of interpolation inputs (ie probe sets with their output)

Geo::GeoAtomic< Geo::u32 > m_InterpolationTimeUs

Interpolation times in microseconds.

eOutputFormat m_IrradianceOutputFormat

Irradiance output format (immutable)

Geo::s64 m_LastUpdateTick

The last time we started to update (used for stats computation).

Geo::GeoMap< Geo::s32, Geo::s32 > m_LightBankMap

Light bank id to number of updates counter.

LightMethodSelector * m_LightMethodSelector

Light method selector.

Geo::GeoKeyValueArray< Geo::GeoGuid, UpdateManagerLight > m_LightsWithoutVisibility

Array of non-directional lights without visibility data.

Geo::GeoKeyValueArray< Geo::GeoGuid, UpdateManagerLight > m_LightsWithVisibility

Array of non-directional lights with visibility data.

Geo::GeoAtomic< Geo::u32 > m_NumEnqueuedUpdates

Number of update calls currently in the command queue.

Geo::GeoArray< Geo::IGeoReleasable * > m_ObjectsToDestroy

Array of objects which need to be destroyed by update manager.

eOutputFormatByteOrder m_OutputFormatByteOrder

Byte order to output 8-bit textures (immutable)

Geo::GeoKeyValueArray< Geo::GeoGuid, BaseProbeSet > m_ProbeSetArray

ProbeSet GUID to data mapping.

Enlighten::IProbeSetManager * m_ProbeSetManager

Probe Sets Manager object that can provide probe weights for interpolation.

Geo::u32 m_PropertiesHash

Hash of the worker properties.

bool m_QuitThread

Flag which tells the worker thread to quit the update loop.

bool m_RecreateInterpolationInputList

Flag set when we need to regenerate the list of probe inputs.

bool m_RegisterWithProfiler

Flag to indicate that all objects need to be registered with the profiler.

bool m_SolvedRadiosity

Whether we have completed a solve since the last stats update.

SolveType m_SolveType

Whether to solve directional irradiance, directional irradiance separately for each colour channel or irradiance only)

EnlightenProfile * m_StatsProfile

Optional pointer to a statistics profiler.

Geo::GeoKeyValueArray< Geo::GeoGuid, BaseSystem > m_SystemArray

System GUID to data mapping.

Command * m_ThreadCreationCommand

Command to execute on the worker thread on creation.

bool m_ThreadRunning

Is the command thread running.

bool m_UseEntireProbeSetSolver

Should we use the EPSS?

bool m_UseProbeSetLod

Use or not Probe Set LOD.

Functions

Name

Description

Name

Description

AddCubeMap(BaseCubeMap *const &)

Add a cube map to the worker.

AddCubeMap(BaseCubeMap *const &)

Add a cube map to the worker.

AddCubeMap(BaseCubeMap *const &)

Add a cube map to the worker.

AddDynamicObject(BaseDynamicObject *const &)

Add a dynamic object to the worker.

AddDynamicObject(BaseDynamicObject *const &)

Add a dynamic object to the worker.

AddProbeSet(BaseProbeSet *const &)

Add a probe set to the worker.

AddProbeSet(BaseProbeSet *const &)

Add a probe set to the worker.

AddProbeSet(BaseProbeSet *const &)

Add a probe set to the worker.

AddSystem(BaseSystem *const &)

Add a system to the worker, and allocate any required auxiliary resources.

AddSystem(BaseSystem *const &)

Add a system to the worker, and allocate any required auxiliary resources.

AddSystem(BaseSystem *const &)

Add a system to the worker, and allocate any required auxiliary resources.

AllocateVisibilityData(Geo::s32, Enlighten::eLightType)

Allocates/Frees memory for visibility data.

BaseWorker(SolveType, eOutputFormat, eOutputFormat, eOutputFormatByteOrder, PrecisionHint::Value, bool, bool, EnlightenProfile *)

Base class constructor.

Clear()

Remove all objects from the worker, and free memory allocated by the worker.

ClearCubeMapVolumeTransparency(Geo::GeoGuid const &)

Clears the cube map volume transparency.

ClearCubeMapVolumeTransparency(Geo::GeoGuid const &)

Clears the cube map volume transparency.

ClearSystemVolumeTransparency(Geo::GeoGuid const &)

Clears the system volume transparency.

ClearSystemVolumeTransparency(Geo::GeoGuid const &)

Clears the system volume transparency.

CopyAlbedoBuffer(CopyAlbedoBufferInfo const &)

Allocate and make a copy of an albedo buffer.

CopyAlbedoBuffer(CopyAlbedoBufferInfo const &)

Allocate and make a copy of an albedo buffer.

CopyBounceBuffer(CopyBounceBufferInfo const &)

Allocate and make a copy of an emissive buffer.

CopyBounceBuffer(CopyBounceBufferInfo const &)

Allocate and make a copy of an emissive buffer.

CopyEmissiveBuffer(CopyEmissiveBufferInfo const &)

Allocate and make a copy of an emissive buffer.

CopyEmissiveBuffer(CopyEmissiveBufferInfo const &)

Allocate and make a copy of an emissive buffer.

CopyEmissiveEnvironment(CopyEmissiveEnvironmentInfo const &)

Allocate and make a copy of an emissive environment.

CopyEmissiveEnvironment(CopyEmissiveEnvironmentInfo const &)

Allocate and make a copy of an emissive environment.

CopyGeometryTransparencyBuffer(CopyTransparencyBufferInfo const &)

Copies the geometry transparency buffer.

CopyGeometryTransparencyBuffer(CopyTransparencyBufferInfo const &)

Allocate and make a copy of a geoemtry transparency buffer.

CopyInputLightingBuffer(CopyInputLightingBufferInfo const &)

Allocate and make a copy of an input lighting buffer.

CopyInputLightingBuffer(CopyInputLightingBufferInfo const &)

Allocate and make a copy of an input lighting buffer.

CopyMaterialTransparencyBuffer(CopyTransparencyBufferInfo const &)

Allocate and make a copy of a material transparency buffer.

CopyMaterialTransparencyBuffer(CopyTransparencyBufferInfo const &)

Allocate and make a copy of a material transparency buffer.

CopyProbeOutput(CopyProbeOutputInfo const &)

Allocate and make a copy of Enlighten probe set output.

CopyProbeOutput(CopyProbeOutputInfo const &)

Allocate and make a copy of Enlighten probe set output.

CopyRawOutput(CopyRawOutputInfo const &)

Allocate and make a copy of raw Enlighten texture output.

CopyRawOutput(CopyRawOutputInfo const &)

Allocate and make a copy of raw Enlighten texture output.

CopyVisibilityBuffer(CopyVisibilityBufferInfo const &)

Allocate and make a copy of a visibility data block.

CopyVisibilityBuffer(CopyVisibilityBufferInfo const &)

Allocate and make a copy of a visibility data block.

CpuWorker(SolveType, eOutputFormat, eOutputFormat, eOutputFormatByteOrder, PrecisionHint::Value, bool, bool, EnlightenProfile *, Command *)

Constructor, taking properties which are fixed at creation time.

DecrementUpdateCounters()

Decrements the update counters for all systems, probe sets, cube maps and light banks.

DestroyAllWorkerObjects()

Release all the objects this worker constructed.

DoDynamicObjectInterpolation(BaseDynamicObject *)

Do the interpolation for a single dynamic object, to allow multithreading.

DoDynamicObjectUpdate()

Runs the probe interpolation tasks for all dynamic objects, non-multithreaded.

DoEnvironmentUpdate()

Copies the environment values from the application-settable copy to the internal copy.

EnqueueCommand(CommandType &&)

Enqueues a command for later execution by the worker thread, if it is running.

EnqueueQuitCommand()

Tell the update thread to quit.

EnqueueRadiosityUpdate()

Enqueue a radiosity update on the worker thread.

ExcludesEnvironmentInPrimaryBounce()

Have we requested to solve the environment in secondary bounce only. (ie skip primary bounce)

ExcludesEnvironmentInPrimaryBounce()

Returns the value of the worker property m_ExcludeEnvrionmentInPrimaryBounce.

ExecuteCommands()

Executes and destroys commands in the command ring buffer until the buffer is empty.

FindObject(const Geo::GeoGuid &, CpuSystem *&)

Specialise the BaseWorker::FindObject to deal with a concrete type here.

FindObject(const Geo::GeoGuid &, BaseProbeSet *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseSystem *&)

Finds the object with the given GUID.

FindObject(ObjectType *, ObjectType *&)

Finds the object with the given address.

FindObject(const Geo::GeoGuid &, ObjectType *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseDynamicObject *&)

Finds the object with the given GUID.

FindObject(const Geo::GeoGuid &, BaseCubeMap *&)

Finds the object with the given GUID.

FreeVisibilityData(Geo::s32, bool)

Allocates/Frees memory for visibility data.

GetInputLightingPrecisionHint()

Gets the precision hint for the input lighting buffer,.

GetLightMethodSelector()

Gets the light method selector.

GetLightMethodSelector()

Gets the light method selector.

GetSizeOfProbeInputWorkspaceMemory()

Get the total size of probe set output workspaces.

GetSizeOfProbeInputWorkspaceMemory()

Get the total size of probe set output workspaces.

GetSizeOfProbeOutputWorkspaceMemory()

Get the total size of probe set input workspaces.

GetSizeOfProbeOutputWorkspaceMemory()

Get the total size of probe set input workspaces.

GetSizeOfWorkingMemory()

Get the size of the working memory required for solving.

GetSizeOfWorkingMemory()

Get the size of the working memory required for solving.

GetSystemArray()

Returns the array of systems. Used by the GeoMaya plug in to work out when to trigger refreshes.

IsCommandThreadSafe()

Returns true if called on the worker thread, or if no worker thread is running.

IsUpdateLimited()

Are we at the limit of the number of allowed enqueued updates, and therefore the update rate is throttled?

IsUpdateLimited()

Are we at the limit of the number of allowed enqueued updates, and therefore the update rate is throttled?

IsWorkerThreadRunning()

Returns true if a separate worker thread is currently running, false if not.

IsWorkerThreadRunning()

Whether the worker thread is currently running.

ProbeSetManagerSetMaxWeightForProbeSet(Geo::GeoGuid const &, float)

Set max interpolation weight for a given probe set.

ProbeSetManagerSetMaxWeightForProbeSet(Geo::GeoGuid const &, float)

Set max interpolation weight for a given probe set.

PushMultipleObjectsToDestroy(Geo::IGeoReleasable *const *, Geo::s32)

Push a list of objects which has been removed from the worker on to a list to be destroyed by the rendering thread.

PushObjectToDestroy(Geo::IGeoReleasable *)

Push an object which has been removed from the worker on to a list to be destroyed by the rendering thread.

ReadInputLightingBuffer(ReadInputLightingBufferInfo const &)

These functions are provided for debugging/visualisation purposes.

ReadInputLightingBuffer(ReadInputLightingBufferInfo const &)

These functions are provided for debugging/visualisation purposes.

RecreateInterpolationInputList()

Updates the probe interpolation inputs, if required.

ReleaseSystemSolutionSpaces(ReleaseSystemSolutionSpacesInfo const &)

Release system solution spaces.

ReleaseSystemSolutionSpaces(ReleaseSystemSolutionSpacesInfo const &)

Release the solution spaces.

RemoveAllLights()

Remove all lights.

RemoveAllLights()

Remove all lights.

RemoveCubeMap(RemoveInfo const &)

Remove a cube map from the worker (either completely or partially)

RemoveCubeMap(RemoveInfo const &)

Remove a cube map from the worker (either completely or partially)