Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebGPUContext

WebGPU context Manages all the webgpu resources here.

Hierarchy

  • WebGPUContext

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

device

device: GPUDevice

memory

memory: Memory

Methods

createShader

  • createShader(info: string, code: string): Function
  • Create a PackedFunc that runs the given shader

    Parameters

    • info: string

      The function information in json.

    • code: string

      The shader data(in WGSL)

    Returns Function

getDeviceAPI

  • getDeviceAPI(name: string): Function
  • Get the device API according to its name

    Parameters

    • name: string

    Returns Function

    The corresponding device api.

sync

  • sync(): Promise<void>
  • Wait for all pending GPU tasks to complete

    Returns Promise<void>

Generated using TypeDoc