Skip to main content

Abstract Class: ComputePass

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:22

Base class for GPU (WebGPU/WebGL) Resources

Extends​

Constructors​

Constructor​

new ComputePass(device, props): ComputePass

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:23

Parameters​

device​

Device

props​

ComputePassProps

Returns​

ComputePass

Overrides​

DeviceResource.constructor

Properties​

device​

abstract readonly device: Device

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:127

The device that this resource is associated with

Inherited from​

DeviceResource.device


handle​

abstract readonly handle: unknown

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:129

The handle for the underlying resource, e.g. WebGL object or WebGPU handle

Inherited from​

DeviceResource.handle


id​

id: string

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:121

props.id, for debugging.

Inherited from​

DeviceResource.id


props​

readonly props: Required<Props>

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:123

The props that this resource was created with

Inherited from​

DeviceResource.props


userData​

readonly userData: Record<string, unknown> = {}

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:125

User data object, reserved for the application

Inherited from​

DeviceResource.userData


defaultProps​

static defaultProps: Required<ComputePassProps>

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:61

Default properties for resource

Overrides​

DeviceResource.defaultProps

Accessors​

[toStringTag]​

Get Signature​

get [toStringTag](): string

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:68

Returns​

string

Overrides​

DeviceResource.[toStringTag]


destroyed​

Get Signature​

get destroyed(): boolean

Defined in: modules/core/src/api/adapter/resources/resource.ts:27

Whether destruction has completed, including when cleanup reported an error.

Returns​

boolean

Inherited from​

DeviceResource.destroyed


isHandleBorrowed​

Get Signature​

get isHandleBorrowed(): boolean

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:146

Whether luma.gl may only reference the opaque externally owned resource handle.

Returns​

boolean

Inherited from​

DeviceResource.isHandleBorrowed


ownedResources​

Get Signature​

get ownedResources(): readonly Resource[]

Defined in: modules/core/src/api/adapter/resources/resource.ts:22

A snapshot of this resource's children. Mutating the snapshot cannot change ownership.

Returns​

readonly Resource[]

Inherited from​

DeviceResource.ownedResources


owner​

Get Signature​

get owner(): Resource | null

Defined in: modules/core/src/api/adapter/resources/resource.ts:17

The resource responsible for destroying this resource, or null for caller-managed lifetime.

Returns​

Resource | null

Inherited from​

DeviceResource.owner


ownsHandle​

Get Signature​

get ownsHandle(): boolean

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:139

Whether luma.gl created and owns the underlying resource handle.

Returns​

boolean

Inherited from​

DeviceResource.ownsHandle

Methods​

[dispose]()​

[dispose](): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:30

End the pass when leaving a using scope.

Returns​

void

Overrides​

DeviceResource.[dispose]


attachResource()​

attachResource(resource): void

Defined in: modules/core/src/api/adapter/resources/resource.ts:96

Parameters​

resource​

Resource

Returns​

void

Deprecated​

Use resource.transferOwnershipTo(this).

Inherited from​

DeviceResource.attachResource


delete()​

delete(): this

Defined in: modules/core/src/api/adapter/resources/resource.ts:90

Returns​

this

Deprecated​

Use destroy().

Inherited from​

DeviceResource.delete


destroy()​

destroy(): void

Defined in: modules/core/src/api/adapter/resources/resource.ts:55

Destroy children before this resource. Subclasses implement hooks instead of overriding.

Returns​

void

Inherited from​

DeviceResource.destroy


destroyAttachedResource()​

destroyAttachedResource(resource): void

Defined in: modules/core/src/api/adapter/resources/resource.ts:108

Parameters​

resource​

Resource

Returns​

void

Deprecated​

Check resource.owner and call resource.destroy().

Inherited from​

DeviceResource.destroyAttachedResource


destroyAttachedResources()​

destroyAttachedResources(): void

Defined in: modules/core/src/api/adapter/resources/resource.ts:115

Returns​

void

Deprecated​

Destroy individually owned resources, or destroy the owner.

Inherited from​

DeviceResource.destroyAttachedResources


detachResource()​

detachResource(resource): void

Defined in: modules/core/src/api/adapter/resources/resource.ts:101

Parameters​

resource​

Resource

Returns​

void

Deprecated​

Use resource.transferOwnershipTo(null). Only detaches a child owned by this.

Inherited from​

DeviceResource.detachResource


dispatch()​

abstract dispatch(x, y?, z?): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:45

Dispatch work to be performed with the current ComputePipeline.

Parameters​

x​

number

X dimension of the grid of workgroups to dispatch.

y?​

number

Y dimension of the grid of workgroups to dispatch.

z?​

number

Z dimension of the grid of workgroups to dispatch.

Returns​

void


dispatchIndirect()​

abstract dispatchIndirect(indirectBuffer, indirectOffset?): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:52

Dispatch work to be performed with the current ComputePipeline.

Parameters​

indirectBuffer​

Buffer

buffer must be a tightly packed block of three 32-bit unsigned integer values (12 bytes total), given in the same order as the arguments for dispatch()

indirectOffset?​

number

Returns​

void


end()​

abstract end(): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:27

Returns​

void


getProps()​

getProps(): object

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:174

Combines a map of user props and default props, only including props from defaultProps

Returns​

object

returns a map of overridden default props

Inherited from​

DeviceResource.getProps


insertDebugMarker()​

abstract insertDebugMarker(markerLabel): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:59

Marks a point in a stream of commands with a label

Parameters​

markerLabel​

string

Returns​

void


popDebugGroup()​

abstract popDebugGroup(): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:57

Ends the labeled debug group most recently started by pushDebugGroup()

Returns​

void


pushDebugGroup()​

abstract pushDebugGroup(groupLabel): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:55

Begins a labeled debug group containing subsequent commands

Parameters​

groupLabel​

string

Returns​

void


setBindings()​

abstract setBindings(bindings): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:37

Replaces the bindings used by subsequent dispatch commands.

Parameters​

bindings​

Bindings | Partial<Record<number, Bindings>>

Returns​

void


setPipeline()​

abstract setPipeline(pipeline): void

Defined in: modules/core/src/api/adapter/resources/compute-pass.ts:34

Parameters​

pipeline​

ComputePipeline

Returns​

void


toJSON()​

toJSON(): string

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:116

Compact serialization for assertion diffs and structured debug logs.

Returns​

string

Inherited from​

DeviceResource.toJSON


toString()​

toString(): string

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:111

Returns a string representation of an object.

Returns​

string

Inherited from​

DeviceResource.toString


transferOwnershipTo()​

transferOwnershipTo(owner): this

Defined in: modules/core/src/api/adapter/resources/resource.ts:32

Transfer exclusive ownership, or return lifetime responsibility to the caller with null.

Parameters​

owner​

Resource | null

Returns​

this

Inherited from​

DeviceResource.transferOwnershipTo