Table of Contents

Class GraphicsAdapter

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Represents a display subsystem (including one or more GPUs, DACs and video memory). A display subsystem is often referred to as a video card, however, on some machines the display subsystem is part of the motherboard.

public sealed class GraphicsAdapter : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
object
GraphicsAdapter
Implements
Inherited Members
Extension Methods

Remarks

To enumerate the GraphicsAdapters that are available in the system, see GraphicsAdapterFactory.

Properties

AdapterUid

Gets the unique identifier of this GraphicsAdapter.

public long AdapterUid { get; }

Property Value

long

DedicatedSystemMemory

Gets the amount of system RAM, in bytes, that is reserved exclusively for use by the adapter. This memory is not available to other applications.

public ulong DedicatedSystemMemory { get; }

Property Value

ulong

Remarks

Common in systems with integrated or hybrid graphics solutions. It provides the GPU with guaranteed access to a portion of system memory for graphics tasks.

DedicatedVideoMemory

Gets the amount of memory, in bytes, on the graphics card (GPU) that is exclusively reserved for graphics operations. This is physical video memory dedicated to the adapter.

public ulong DedicatedVideoMemory { get; }

Property Value

ulong

Remarks

Typically used for storing Textures, Frame Buffers, and other GPU-specific resources. High-performance discrete GPUs usually have a large amount of dedicated video memory.

Description

Gets the description of this adapter.

public string Description { get; }

Property Value

string

IsDefaultAdapter

Determines if this GraphicsAdapter is the default adapter.

public bool IsDefaultAdapter { get; }

Property Value

bool

Outputs

Gets the GraphicsOutputs attached to this adapter.

public ReadOnlySpan<GraphicsOutput> Outputs { get; }

Property Value

ReadOnlySpan<GraphicsOutput>

SharedSystemMemory

Gets the amount of system RAM, in bytes, that can be shared between the adapter and the CPU. This memory is dynamically allocated and can be used by both graphics and general system tasks.

public ulong SharedSystemMemory { get; }

Property Value

ulong

Remarks

Used when the GPU needs additional memory beyond its dedicated resources. Integrated GPUs rely heavily on shared system memory, while discrete GPUs use it as a fallback.

VendorId

Gets the vendor identifier of this adapter.

public int VendorId { get; }

Property Value

int

Methods

Destroy()

Disposes the object's resources.

protected override void Destroy()

Remarks

Override in a derived class to implement disposal logic specific to it.

This method is automatically called whenever a call to Dispose() (or to Release()) has decreased the internal reference count to zero, meaning no other objects (hopefully) hold a reference to this one and its resources can be safely released.

IsProfileSupported(GraphicsProfile)

Checks if the graphics adapter supports the requested profile.

public bool IsProfileSupported(GraphicsProfile graphicsProfile)

Parameters

graphicsProfile GraphicsProfile

The graphics profile to check.

Returns

bool

true if the graphics profile is supported; false otherwise.

ToString()

Returns the description of this GraphicsAdapter.

public override string ToString()

Returns

string