BufferLogger¶
Overview¶
Assists in logging out buffers for WebGPU debugging.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class BufferLogger¶
Constructor¶
new BufferLogger( deviceContext : DeviceContext )¶
Instance Methods¶
complete() : Promise<void>¶
hasCallbacks() : boolean¶
withBuffer( encoder : GPUCommandEncoder, buffer : GPUBuffer, callback : ( arrayBuffer: ArrayBuffer ) => Promise<void> )¶
arrayBufferPromise( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<ArrayBuffer>¶
arrayBuffer( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<ArrayBuffer>¶
u32( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<Uint32Array>¶
i32( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<Int32Array>¶
f32( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<Float32Array>¶
u32Numbers( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<number[]>¶
i32Numbers( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<number[]>¶
f32Numbers( encoder : GPUCommandEncoder, buffer : GPUBuffer ) : Promise<number[]>¶
logIndexed( encoder : GPUCommandEncoder, buffer : GPUBuffer, name : string, type : FromArrayBufferable, lengthCallback : ( () => number ) | null )¶
logIndexedMultiline( encoder : GPUCommandEncoder, buffer : GPUBuffer, name : string, type : FromMultiArrayBufferable, lengthCallback : ( () => number ) | null )¶
logIndexedImmediate( arrayBuffer : ArrayBuffer, name : string, type : FromArrayBufferable, lengthCallback : ( () => number ) | null )¶
Static Methods¶
toIndexedString( n : { toString(): string }, i : number ) : string¶
toMultiIndexedString( n : { toStrings(): string[] }, i : number ) : string¶
startGroup( name : string )¶
endGroup()¶
Static Properties¶
RasterU32¶
(readonly)
RasterI32¶
(readonly)
RasterF32¶
(readonly)
Type FromArrayBufferable¶
- fromArrayBuffer: ( arrayBuffer: ArrayBuffer ) => { toString(): string }[]
Type FromMultiArrayBufferable¶
- fromArrayBuffer: ( arrayBuffer: ArrayBuffer ) => { toStrings(): string[] }[]
Source Code¶
See the source for BufferLogger.ts in the alpenglow repository.