GPUAdapter


class GPUAdapter : AutoCloseable


Represents a physical graphics adapter.

Summary

Public functions

open external Unit

Decrements the reference count of the object and frees resources when the count reaches zero.

open operator Boolean
equals(other: Any?)
external GPUSupportedFeatures

Retrieves the list of features supported by the adapter.

external GPUAdapterInfo

Retrieves detailed information about the adapter.

external GPULimits

Retrieves the limits supported by the adapter.

external Boolean

Checks if a specific feature is supported by the adapter.

open Int
suspend GPUDevice

Asynchronously requests a device from the adapter.

external Unit
@FastNative
requestDevice(
    callbackExecutor: Executor,
    descriptor: GPUDeviceDescriptor?,
    callback: GPURequestCallback<GPUDevice>
)

Asynchronously requests a device from the adapter.

Public properties

Long

Public functions

close

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

Decrements the reference count of the object and frees resources when the count reaches zero.

This is the standard way to manage object lifetimes and should be used in use blocks. After calling this, the object is no longer usable.

equals

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

getFeatures

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

Retrieves the list of features supported by the adapter.

getInfo

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

Retrieves detailed information about the adapter.

Returns
GPUAdapterInfo

The status of the operation.

getLimits

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

Retrieves the limits supported by the adapter.

Returns
GPULimits

The status of the operation.

hasFeature

Added in 1.0.0-alpha04
@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.

Returns
Boolean

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

hashCode

open fun hashCode(): Int

requestDevice

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

Asynchronously requests a device from the adapter.

Parameters
descriptor: GPUDeviceDescriptor? = null

The descriptor for the device.

requestDevice

Added in 1.0.0-alpha04
@FastNative
external fun requestDevice(
    callbackExecutor: Executor,
    descriptor: GPUDeviceDescriptor? = null,
    callback: GPURequestCallback<GPUDevice>
): Unit

Asynchronously requests a device from the adapter.

Public properties

handle

Added in 1.0.0-alpha04
val handleLong