GPUAdapter


public final class GPUAdapter implements AutoCloseable


Represents an abstract graphics card on the system.

Summary

Public methods

external void
boolean
equals(Object other)
final external @NonNull SupportedFeatures

Gets the set of features supported by the adapter.

final long
final external @NonNull AdapterInfo

Gets detailed information about the adapter.

final external @NonNull Limits

Gets the limits supported by the adapter.

final external boolean
@FastNative
hasFeature(int feature)

Checks if a specific feature is supported by the adapter.

int
final @NonNull GPUDevice

Requests a GPU device object from the adapter asynchronously.

final external void
@FastNative
requestDevice(
    @NonNull Executor callbackExecutor,
    DeviceDescriptor descriptor,
    @NonNull RequestDeviceCallback callback
)

Requests a GPU device object from the adapter asynchronously.

Public methods

close

Added in 1.0.0-alpha01
public external void close()

equals

public boolean equals(Object other)

getFeatures

Added in 1.0.0-alpha01
@FastNative
public final external @NonNull SupportedFeatures getFeatures()

Gets the set of features supported by the adapter.

getHandle

Added in 1.0.0-alpha01
public final long getHandle()

getInfo

Added in 1.0.0-alpha01
@FastNative
public final external @NonNull AdapterInfo getInfo()

Gets detailed information about the adapter.

Returns
@NonNull AdapterInfo

Status code of the operation.

getLimits

Added in 1.0.0-alpha01
@FastNative
public final external @NonNull Limits getLimits()

Gets the limits supported by the adapter.

Returns
@NonNull Limits

Status code of the operation.

hasFeature

Added in 1.0.0-alpha01
@FastNative
public final external boolean hasFeature(int feature)

Checks if a specific feature is supported by the adapter.

Parameters
int feature

The feature to check for support.

Returns
boolean

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

hashCode

public int hashCode()

requestDevice

public final @NonNull GPUDevice requestDevice(DeviceDescriptor descriptor)

Requests a GPU device object from the adapter asynchronously.

Parameters
DeviceDescriptor descriptor

A descriptor specifying creation options for the device.

requestDevice

Added in 1.0.0-alpha01
@FastNative
public final external void requestDevice(
    @NonNull Executor callbackExecutor,
    DeviceDescriptor descriptor,
    @NonNull RequestDeviceCallback callback
)

Requests a GPU device object from the adapter asynchronously.