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, data: Uint8Array): Function
  • Create a PackedFunc that runs the given shader

    Parameters

    • info: string

      The function information in json.

    • data: Uint8Array

      The shader data(in SPIRV)

    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