---
title: "GPUDevice | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# Interface GPUDevice

The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. Available only in secure contexts.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)

interface GPUDevice {  
    [adapterInfo](#adapterinfo): [GPUAdapterInfo](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUAdapterInfo/);  
    [features](#features): [GPUSupportedFeatures](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSupportedFeatures/);  
    [label](#label): string;  
    [limits](#limits): [GPUSupportedLimits](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSupportedLimits/);  
    [lost](#lost): Promise<[GPUDeviceLostInfo](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceLostInfo/)\>;  
    [onuncapturederror](#onuncapturederror):  
        | ((this: GPUDevice, ev: [GPUUncapturedErrorEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUUncapturedErrorEvent/)) \=> any)  
        | null;  
    [queue](#queue): [GPUQueue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQueue/);  
    [addEventListener](#addeventlistener-1)<[K](#addeventlistenerk) extends "uncapturederror"\>(  
        type: [K](#addeventlistenerk),  
        listener: (this: GPUDevice, ev: [GPUDeviceEventMap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceEventMap/)\[[K](#addeventlistenerk)\]) \=> any,  
        options?: boolean | AddEventListenerOptions,  
    ): void;  
    [addEventListener](#addeventlistener-2)(  
        type: string,  
        listener: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/),  
        options?: boolean | AddEventListenerOptions,  
    ): void;  
    [createBindGroup](#createbindgroup-1)(descriptor: [GPUBindGroupDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupDescriptor/)): [GPUBindGroup](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroup/);  
    [createBindGroupLayout](#createbindgrouplayout-1)(  
        descriptor: [GPUBindGroupLayoutDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupLayoutDescriptor/),  
    ): [GPUBindGroupLayout](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupLayout/);  
    [createBuffer](#createbuffer-1)(descriptor: [GPUBufferDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBufferDescriptor/)): [GPUBuffer](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBuffer/);  
    [createCommandEncoder](#createcommandencoder-1)(  
        descriptor?: [GPUCommandEncoderDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUCommandEncoderDescriptor/),  
    ): [GPUCommandEncoder](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUCommandEncoder/);  
    [createComputePipeline](#createcomputepipeline-1)(  
        descriptor: [GPUComputePipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipelineDescriptor/),  
    ): [GPUComputePipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipeline/);  
    [createComputePipelineAsync](#createcomputepipelineasync-1)(  
        descriptor: [GPUComputePipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipelineDescriptor/),  
    ): Promise<[GPUComputePipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipeline/)\>;  
    [createPipelineLayout](#createpipelinelayout-1)(  
        descriptor: [GPUPipelineLayoutDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUPipelineLayoutDescriptor/),  
    ): [GPUPipelineLayout](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUPipelineLayout/);  
    [createQuerySet](#createqueryset-1)(descriptor: [GPUQuerySetDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQuerySetDescriptor/)): [GPUQuerySet](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQuerySet/);  
    [createRenderBundleEncoder](#createrenderbundleencoder-1)(  
        descriptor: [GPURenderBundleEncoderDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderBundleEncoderDescriptor/),  
    ): [GPURenderBundleEncoder](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderBundleEncoder/);  
    [createRenderPipeline](#createrenderpipeline-1)(  
        descriptor: [GPURenderPipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipelineDescriptor/),  
    ): [GPURenderPipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipeline/);  
    [createRenderPipelineAsync](#createrenderpipelineasync-1)(  
        descriptor: [GPURenderPipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipelineDescriptor/),  
    ): Promise<[GPURenderPipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipeline/)\>;  
    [createSampler](#createsampler-1)(descriptor?: [GPUSamplerDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSamplerDescriptor/)): [GPUSampler](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSampler/);  
    [createShaderModule](#createshadermodule-1)(descriptor: [GPUShaderModuleDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUShaderModuleDescriptor/)): [GPUShaderModule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUShaderModule/);  
    [createTexture](#createtexture-1)(descriptor: [GPUTextureDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUTextureDescriptor/)): [GPUTexture](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUTexture/);  
    [destroy](#destroy-1)(): void;  
    [dispatchEvent](#dispatchevent-1)(event: Event): boolean;  
    [importExternalTexture](#importexternaltexture-1)(  
        descriptor: [GPUExternalTextureDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUExternalTextureDescriptor/),  
    ): [GPUExternalTexture](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUExternalTexture/);  
    [popErrorScope](#poperrorscope-1)(): Promise<[GPUError](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUError/) | null\>;  
    [pushErrorScope](#pusherrorscope-1)(filter: [GPUErrorFilter](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GPUErrorFilter/)): void;  
    [removeEventListener](#removeeventlistener-1)<[K](#removeeventlistenerk) extends "uncapturederror"\>(  
        type: [K](#removeeventlistenerk),  
        listener: (this: GPUDevice, ev: [GPUDeviceEventMap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceEventMap/)\[[K](#removeeventlistenerk)\]) \=> any,  
        options?: boolean | EventListenerOptions,  
    ): void;  
    [removeEventListener](#removeeventlistener-2)(  
        type: string,  
        listener: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/),  
        options?: boolean | EventListenerOptions,  
    ): void;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.GPUDevice))

-   EventTarget
-   [GPUObjectBase](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUObjectBase/)
    -   GPUDevice

##### Index

### Properties[](#properties)

[adapterInfo](#adapterinfo) [features](#features) [label](#label) [limits](#limits) [lost](#lost) [onuncapturederror](#onuncapturederror) [queue](#queue)

### Methods[](#methods)

[addEventListener](#addeventlistener) [createBindGroup](#createbindgroup) [createBindGroupLayout](#createbindgrouplayout) [createBuffer](#createbuffer) [createCommandEncoder](#createcommandencoder) [createComputePipeline](#createcomputepipeline) [createComputePipelineAsync](#createcomputepipelineasync) [createPipelineLayout](#createpipelinelayout) [createQuerySet](#createqueryset) [createRenderBundleEncoder](#createrenderbundleencoder) [createRenderPipeline](#createrenderpipeline) [createRenderPipelineAsync](#createrenderpipelineasync) [createSampler](#createsampler) [createShaderModule](#createshadermodule) [createTexture](#createtexture) [destroy](#destroy) [dispatchEvent](#dispatchevent) [importExternalTexture](#importexternaltexture) [popErrorScope](#poperrorscope) [pushErrorScope](#pusherrorscope) [removeEventListener](#removeeventlistener)

## Properties[](#properties-1)

### `Readonly`adapterInfo[](#adapterinfo)

adapterInfo: [GPUAdapterInfo](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUAdapterInfo/)

The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)

### `Readonly`features[](#features)

features: [GPUSupportedFeatures](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSupportedFeatures/)

The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)

### label[](#label)

label: string

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label)

Inherited from [GPUObjectBase](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUObjectBase/).[label](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUObjectBase/#label)

### `Readonly`limits[](#limits)

limits: [GPUSupportedLimits](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSupportedLimits/)

The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)

### `Readonly`lost[](#lost)

lost: Promise<[GPUDeviceLostInfo](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceLostInfo/)\>

The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)

### onuncapturederror[](#onuncapturederror)

onuncapturederror:  
    | ((this: GPUDevice, ev: [GPUUncapturedErrorEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUUncapturedErrorEvent/)) \=> any)  
    | null

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event)

### `Readonly`queue[](#queue)

queue: [GPUQueue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQueue/)

The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)

## Methods[](#methods-1)

### addEventListener[](#addeventlistener)

-   addEventListener<[K](#addeventlistenerk) extends "uncapturederror"\>(  
        type: [K](#addeventlistenerk),  
        listener: (this: GPUDevice, ev: [GPUDeviceEventMap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceEventMap/)\[[K](#addeventlistenerk)\]) \=> any,  
        options?: boolean | AddEventListenerOptions,  
    ): void[](#addeventlistener-1)
    
    The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
    
    #### Type Parameters
    
    -   K extends "uncapturederror"
    
    #### Parameters
    
    -   type: [K](#addeventlistenerk)
    -   listener: (this: GPUDevice, ev: [GPUDeviceEventMap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceEventMap/)\[[K](#addeventlistenerk)\]) \=> any
    -   `Optional`options: boolean | AddEventListenerOptions
    
    #### Returns void
    
    Overrides EventTarget.addEventListener
    
-   addEventListener(  
        type: string,  
        listener: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/),  
        options?: boolean | AddEventListenerOptions,  
    ): void[](#addeventlistener-2)
    
    The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
    
    #### Parameters
    
    -   type: string
    -   listener: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/)
    -   `Optional`options: boolean | AddEventListenerOptions
    
    #### Returns void
    
    Overrides EventTarget.addEventListener
    

### createBindGroup[](#createbindgroup)

-   createBindGroup(descriptor: [GPUBindGroupDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupDescriptor/)): [GPUBindGroup](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroup/)[](#createbindgroup-1)
    
    The **`createBindGroup()`** method of the GPUDevice interface creates a GPUBindGroup based on a GPUBindGroupLayout that defines a set of resources to be bound together in a group and how those resources are used in shader stages.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
    
    #### Parameters
    
    -   descriptor: [GPUBindGroupDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupDescriptor/)
    
    #### Returns [GPUBindGroup](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroup/)
    

### createBindGroupLayout[](#createbindgrouplayout)

-   createBindGroupLayout(  
        descriptor: [GPUBindGroupLayoutDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupLayoutDescriptor/),  
    ): [GPUBindGroupLayout](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupLayout/)[](#createbindgrouplayout-1)
    
    The **`createBindGroupLayout()`** method of the GPUDevice interface creates a GPUBindGroupLayout that defines the structure and purpose of related GPU resources such as buffers that will be used in a pipeline, and is used as a template when creating GPUBindGroups.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout)
    
    #### Parameters
    
    -   descriptor: [GPUBindGroupLayoutDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupLayoutDescriptor/)
    
    #### Returns [GPUBindGroupLayout](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBindGroupLayout/)
    

### createBuffer[](#createbuffer)

-   createBuffer(descriptor: [GPUBufferDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBufferDescriptor/)): [GPUBuffer](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBuffer/)[](#createbuffer-1)
    
    The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
    
    #### Parameters
    
    -   descriptor: [GPUBufferDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBufferDescriptor/)
    
    #### Returns [GPUBuffer](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUBuffer/)
    

### createCommandEncoder[](#createcommandencoder)

-   createCommandEncoder(  
        descriptor?: [GPUCommandEncoderDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUCommandEncoderDescriptor/),  
    ): [GPUCommandEncoder](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUCommandEncoder/)[](#createcommandencoder-1)
    
    The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
    
    #### Parameters
    
    -   `Optional`descriptor: [GPUCommandEncoderDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUCommandEncoderDescriptor/)
    
    #### Returns [GPUCommandEncoder](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUCommandEncoder/)
    

### createComputePipeline[](#createcomputepipeline)

-   createComputePipeline(  
        descriptor: [GPUComputePipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipelineDescriptor/),  
    ): [GPUComputePipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipeline/)[](#createcomputepipeline-1)
    
    The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
    
    #### Parameters
    
    -   descriptor: [GPUComputePipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipelineDescriptor/)
    
    #### Returns [GPUComputePipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipeline/)
    

### createComputePipelineAsync[](#createcomputepipelineasync)

-   createComputePipelineAsync(  
        descriptor: [GPUComputePipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipelineDescriptor/),  
    ): Promise<[GPUComputePipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipeline/)\>[](#createcomputepipelineasync-1)
    
    The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
    
    #### Parameters
    
    -   descriptor: [GPUComputePipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipelineDescriptor/)
    
    #### Returns Promise<[GPUComputePipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUComputePipeline/)\>
    

### createPipelineLayout[](#createpipelinelayout)

-   createPipelineLayout(descriptor: [GPUPipelineLayoutDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUPipelineLayoutDescriptor/)): [GPUPipelineLayout](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUPipelineLayout/)[](#createpipelinelayout-1)
    
    The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
    
    #### Parameters
    
    -   descriptor: [GPUPipelineLayoutDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUPipelineLayoutDescriptor/)
    
    #### Returns [GPUPipelineLayout](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUPipelineLayout/)
    

### createQuerySet[](#createqueryset)

-   createQuerySet(descriptor: [GPUQuerySetDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQuerySetDescriptor/)): [GPUQuerySet](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQuerySet/)[](#createqueryset-1)
    
    The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
    
    #### Parameters
    
    -   descriptor: [GPUQuerySetDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQuerySetDescriptor/)
    
    #### Returns [GPUQuerySet](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUQuerySet/)
    

### createRenderBundleEncoder[](#createrenderbundleencoder)

-   createRenderBundleEncoder(  
        descriptor: [GPURenderBundleEncoderDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderBundleEncoderDescriptor/),  
    ): [GPURenderBundleEncoder](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderBundleEncoder/)[](#createrenderbundleencoder-1)
    
    The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
    
    #### Parameters
    
    -   descriptor: [GPURenderBundleEncoderDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderBundleEncoderDescriptor/)
    
    #### Returns [GPURenderBundleEncoder](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderBundleEncoder/)
    

### createRenderPipeline[](#createrenderpipeline)

-   createRenderPipeline(descriptor: [GPURenderPipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipelineDescriptor/)): [GPURenderPipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipeline/)[](#createrenderpipeline-1)
    
    The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
    
    #### Parameters
    
    -   descriptor: [GPURenderPipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipelineDescriptor/)
    
    #### Returns [GPURenderPipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipeline/)
    

### createRenderPipelineAsync[](#createrenderpipelineasync)

-   createRenderPipelineAsync(  
        descriptor: [GPURenderPipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipelineDescriptor/),  
    ): Promise<[GPURenderPipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipeline/)\>[](#createrenderpipelineasync-1)
    
    The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
    
    #### Parameters
    
    -   descriptor: [GPURenderPipelineDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipelineDescriptor/)
    
    #### Returns Promise<[GPURenderPipeline](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPURenderPipeline/)\>
    

### createSampler[](#createsampler)

-   createSampler(descriptor?: [GPUSamplerDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSamplerDescriptor/)): [GPUSampler](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSampler/)[](#createsampler-1)
    
    The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
    
    #### Parameters
    
    -   `Optional`descriptor: [GPUSamplerDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSamplerDescriptor/)
    
    #### Returns [GPUSampler](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUSampler/)
    

### createShaderModule[](#createshadermodule)

-   createShaderModule(descriptor: [GPUShaderModuleDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUShaderModuleDescriptor/)): [GPUShaderModule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUShaderModule/)[](#createshadermodule-1)
    
    The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
    
    #### Parameters
    
    -   descriptor: [GPUShaderModuleDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUShaderModuleDescriptor/)
    
    #### Returns [GPUShaderModule](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUShaderModule/)
    

### createTexture[](#createtexture)

-   createTexture(descriptor: [GPUTextureDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUTextureDescriptor/)): [GPUTexture](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUTexture/)[](#createtexture-1)
    
    The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
    
    #### Parameters
    
    -   descriptor: [GPUTextureDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUTextureDescriptor/)
    
    #### Returns [GPUTexture](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUTexture/)
    

### destroy[](#destroy)

-   destroy(): void[](#destroy-1)
    
    The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy)
    
    #### Returns void
    

### dispatchEvent[](#dispatchevent)

-   dispatchEvent(event: Event): boolean[](#dispatchevent-1)
    
    The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
    
    #### Parameters
    
    -   event: Event
    
    #### Returns boolean
    
    Inherited from EventTarget.dispatchEvent
    

### importExternalTexture[](#importexternaltexture)

-   importExternalTexture(  
        descriptor: [GPUExternalTextureDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUExternalTextureDescriptor/),  
    ): [GPUExternalTexture](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUExternalTexture/)[](#importexternaltexture-1)
    
    The **`importExternalTexture()`** method of the GPUDevice interface takes an HTMLVideoElement or a VideoFrame object as an input and returns a GPUExternalTexture wrapper object containing a snapshot of the video that can be used as a frame in GPU rendering operations.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture)
    
    #### Parameters
    
    -   descriptor: [GPUExternalTextureDescriptor](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUExternalTextureDescriptor/)
    
    #### Returns [GPUExternalTexture](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUExternalTexture/)
    

### popErrorScope[](#poperrorscope)

-   popErrorScope(): Promise<[GPUError](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUError/) | null\>[](#poperrorscope-1)
    
    The **`popErrorScope()`** method of the GPUDevice interface pops an existing GPU error scope from the error scope stack (originally pushed using GPUDevice.pushErrorScope()) and returns a Promise that resolves to an object describing the first error captured in the scope, or null if no error occurred.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope)
    
    #### Returns Promise<[GPUError](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUError/) | null\>
    

### pushErrorScope[](#pusherrorscope)

-   pushErrorScope(filter: [GPUErrorFilter](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GPUErrorFilter/)): void[](#pusherrorscope-1)
    
    The **`pushErrorScope()`** method of the GPUDevice interface pushes a new GPU error scope onto the device's error scope stack, allowing you to capture errors of a particular type.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope)
    
    #### Parameters
    
    -   filter: [GPUErrorFilter](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GPUErrorFilter/)
    
    #### Returns void
    

### removeEventListener[](#removeeventlistener)

-   removeEventListener<[K](#removeeventlistenerk) extends "uncapturederror"\>(  
        type: [K](#removeeventlistenerk),  
        listener: (this: GPUDevice, ev: [GPUDeviceEventMap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceEventMap/)\[[K](#removeeventlistenerk)\]) \=> any,  
        options?: boolean | EventListenerOptions,  
    ): void[](#removeeventlistener-1)
    
    The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
    
    #### Type Parameters
    
    -   K extends "uncapturederror"
    
    #### Parameters
    
    -   type: [K](#removeeventlistenerk)
    -   listener: (this: GPUDevice, ev: [GPUDeviceEventMap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GPUDeviceEventMap/)\[[K](#removeeventlistenerk)\]) \=> any
    -   `Optional`options: boolean | EventListenerOptions
    
    #### Returns void
    
    Overrides EventTarget.removeEventListener
    
-   removeEventListener(  
        type: string,  
        listener: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/),  
        options?: boolean | EventListenerOptions,  
    ): void[](#removeeventlistener-2)
    
    The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
    
    #### Parameters
    
    -   type: string
    -   listener: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/)
    -   `Optional`options: boolean | EventListenerOptions
    
    #### Returns void
    
    Overrides EventTarget.removeEventListener
