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 GPUSupportedFeatures

Gets the set of features supported by the adapter.

external GPUAdapterInfo

Gets detailed information about the adapter.

external GPULimits

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: GPUDeviceDescriptor?,
    callback: RequestDeviceCallback
)

Requests a GPU device object from the adapter asynchronously.

Public properties

Long

Public functions

close

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

equals

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

getFeatures

Added in 1.0.0-alpha02
@FastNative
external fun getFeatures(): GPUSupportedFeatures

Gets the set of features supported by the adapter.

getInfo

Added in 1.0.0-alpha02
@FastNative
external fun getInfo(): GPUAdapterInfo

Gets detailed information about the adapter.

Returns
GPUAdapterInfo

Status code of the operation.

getLimits

Added in 1.0.0-alpha02
@FastNative
external fun getLimits(): GPULimits

Gets the limits supported by the adapter.

Returns
GPULimits

Status code of the operation.

hasFeature

Added in 1.0.0-alpha02
@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: GPUDeviceDescriptor? = null): GPUDevice

Requests a GPU device object from the adapter asynchronously.

Parameters
descriptor: GPUDeviceDescriptor? = null

A descriptor specifying creation options for the device.

requestDevice

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

Requests a GPU device object from the adapter asynchronously.

Public properties

handle

Added in 1.0.0-alpha02
val handleLong