Aller au contenu

DeviceDescriptor

data class DeviceDescriptor(
    val requiredFeatures: List<GPUFeatureName> = emptyList(), 
    val requiredLimits: GPURequiredLimits? = null, 
    val defaultQueue: GPUQueueDescriptor = QueueDescriptor(), 
    val label: String = "", 
    val onUncapturedError: GPUUncapturedErrorCallback? = null
) : GPUDeviceDescriptor
GPUDeviceDescriptor describes a device request. See [GPUDeviceDescriptor in the WebGPU specification](https://www.w3.org/TR/webgpu/#dictdef-gpudevicedescriptor).

Constructors

DeviceDescriptor

constructor(
    requiredFeatures: List<GPUFeatureName> = emptyList(), 
    requiredLimits: GPURequiredLimits? = null, 
    defaultQueue: GPUQueueDescriptor = QueueDescriptor(), 
    label: String = "", 
    onUncapturedError: GPUUncapturedErrorCallback? = null
)

Properties

defaultQueue

open override val defaultQueue: GPUQueueDescriptor
The descriptor for the default GPUQueue. See [GPUDeviceDescriptor.defaultQueue in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpudevicedescriptor-defaultqueue).

label

open override val label: String

onUncapturedError

open override val onUncapturedError: GPUUncapturedErrorCallback?
Callback invoked for errors that are not captured by an error scope.

requiredFeatures

open override val requiredFeatures: List<GPUFeatureName>
Specifies the features that are required by the device request. The request will fail if the adapter cannot provide these features. Exactly the specified set of features, and no more or less, will be allowed in validation of API calls on the resulting device.

requiredLimits

open override val requiredLimits: GPURequiredLimits?
Specifies the limits that are required by the device request. The request will fail if the adapter cannot provide these limits. Each key with a non-undefined value must be the name of a member of supported limits.