GPUAdapter
public final class GPUAdapter implements AutoCloseable
Represents an abstract graphics card on the system.
Summary
Public methods |
|
|---|---|
external void |
close() |
boolean |
|
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 |
@FastNativeChecks if a specific feature is supported by the adapter. |
int |
hashCode() |
final @NonNull GPUDevice |
requestDevice(DeviceDescriptor descriptor)Requests a GPU device object from the adapter asynchronously. |
final external void |
@FastNativeRequests a GPU device object from the adapter asynchronously. |
Public methods
getFeatures
@FastNative
public final external @NonNull SupportedFeatures getFeatures()
Gets the set of features supported by the adapter.
getInfo
@FastNative
public final external @NonNull AdapterInfo getInfo()
Gets detailed information about the adapter.
| Returns | |
|---|---|
@NonNull AdapterInfo |
Status code of the operation. |
getLimits
@FastNative
public final external @NonNull Limits getLimits()
Gets the limits supported by the adapter.
hasFeature
@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. |
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
@FastNative
public final external void requestDevice(
@NonNull Executor callbackExecutor,
DeviceDescriptor descriptor,
@NonNull RequestDeviceCallback callback
)
Requests a GPU device object from the adapter asynchronously.