ConsoleLogger¶
Overview¶
Supports "console logging" from shaders. See log.wgsl.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class ConsoleLogger¶
Static Methods¶
register( info : StrictOmit<ConsoleLogInfo<T>, 'id'> ) : number¶
analyze( arrayBuffer : ArrayBuffer ) : ConsoleLoggedShader[]¶
Class ConsoleLoggedEntry¶
Constructor¶
new ConsoleLoggedEntry( info : ConsoleLogInfo, data : T, additionalIndex : number | null, otherEntries : ConsoleLoggedEntry[] )¶
Instance Methods¶
Instance Properties¶
uniqueId : string¶
(readonly)
Class ConsoleLoggedLine¶
Constructor¶
new ConsoleLoggedLine( info : ConsoleLogInfo, additionalIndex : number | null, dataArray : T[], threads : ConsoleLoggedThread[] )¶
Instance Methods¶
Static Methods¶
toLogNull( line : ConsoleLoggedLine ) : unknown¶
toLogRaw( line : ConsoleLoggedLine ) : unknown¶
toLogExisting( line : ConsoleLoggedLine ) : unknown¶
toLogExistingFlat( line : ConsoleLoggedLine ) : unknown¶
Class ConsoleLoggedShader¶
Instance Methods¶
add( info : ConsoleLogInfo, workgroupIndex : Vector3, localIndex : Vector3, data : unknown, additionalIndex : number | null )¶
isEmpty() : boolean¶
finalize()¶
Instance Properties¶
shaderName : string | null¶
threads : ConsoleLoggedThread[]¶
(readonly)
threadMap : Record<string, ConsoleLoggedThread>¶
(readonly)
logLines : ConsoleLoggedLine[]¶
(readonly)
Class ConsoleLoggedThread¶
TODO: Should we create ConsoleLoggedWorkgroup?
Constructor¶
new ConsoleLoggedThread( workgroupIndex : Vector3, localIndex : Vector3 )¶
Instance Methods¶
add( info : ConsoleLogInfo, data : unknown, additionalIndex : number | null )¶
compare( other : ConsoleLoggedThread ) : number¶
Instance Properties¶
entries : ConsoleLoggedEntry[]¶
(readonly)
Type ConsoleLogInfo¶
- id: number
Filled in when registered - logName: string
Provided by the registering code - shaderName: string
- hasAdditionalIndex: boolean
- type: ConcreteType<T> | null
- dataCount: number | null
- lineToLog: ( line: ConsoleLoggedLine ) => unknown
Source Code¶
See the source for ConsoleLogger.ts in the alpenglow repository.