GPUAdapter


class GPUAdapter : AutoCloseable


Represents an abstract graphics card on the system.

Summary

Public functions

open external Unit
open operator Boolean
equals(other: Any?)
external SupportedFeatures

Gets the set of features supported by the adapter.

external AdapterInfo

Gets detailed information about the adapter.

external Limits

Gets the limits supported by the adapter.

external Boolean

Checks if a specific feature is supported by the adapter.

open Int
suspend GPUDevice

Requests a GPU device object from the adapter asynchronously.

external Unit
@FastNative
requestDevice(
    callbackExecutor: Executor,
    descriptor: DeviceDescriptor?,
    callback: RequestDeviceCallback
)

Requests a GPU device object from the adapter asynchronously.

Public properties

Long

Public functions

close

Added in 1.0.0-alpha01
open external fun close(): Unit

equals

open operator fun equals(other: Any?): Boolean

getFeatures

Added in 1.0.0-alpha01
@FastNative
external fun getFeatures(): SupportedFeatures

Gets the set of features supported by the adapter.

getInfo

Added in 1.0.0-alpha01
@FastNative
external fun getInfo(): AdapterInfo

Gets detailed information about the adapter.

Returns
AdapterInfo

Status code of the operation.

getLimits

Added in 1.0.0-alpha01
@FastNative
external fun getLimits(): Limits

Gets the limits supported by the adapter.

Returns
Limits

Status code of the operation.

hasFeature

Added in 1.0.0-alpha01
@FastNative
external fun hasFeature(feature: Int): Boolean

Checks if a specific feature is supported by the adapter.

Parameters
feature: Int

The feature to check for support.

Returns
Boolean

True if the feature is supported, {@code false} otherwise.

hashCode

open fun hashCode(): Int

requestDevice

suspend fun requestDevice(descriptor: DeviceDescriptor? = null): GPUDevice

Requests a GPU device object from the adapter asynchronously.

Parameters
descriptor: DeviceDescriptor? = null

A descriptor specifying creation options for the device.

requestDevice

Added in 1.0.0-alpha01
@FastNative
external fun requestDevice(
    callbackExecutor: Executor,
    descriptor: DeviceDescriptor? = null,
    callback: RequestDeviceCallback
): Unit

Requests a GPU device object from the adapter asynchronously.

Public properties

handle

Added in 1.0.0-alpha01
val handleLong