|
Ream v0.1.0-1
C++ graphics library for Linux
|
A rendering device. More...
#include <RDevice.h>
Inheritance diagram for RDevice:Classes | |
| struct | Caps |
| Device capabilities. More... | |
Public Member Functions | |
| ~RDevice () noexcept | |
| Destructor. | |
| virtual void | wait () noexcept=0 |
| Blocks until the device has finished all pending work. | |
| int | drmFd () const noexcept |
| Returns the primary DRM file descriptor. | |
| int | drmFdReadOnly () const noexcept |
| Returns the read-only DRM file descriptor. | |
| void * | drmUserData () const noexcept |
| Returns the user data associated with the DRM device. | |
| dev_t | id () const noexcept |
| Returns the device id (dev_t) of the DRM node. | |
| const std::string & | drmNode () const noexcept |
| Returns the path of the DRM node. | |
| const std::string & | drmDriverName () const noexcept |
| Returns the DRM driver name. | |
| RDriver | drmDriver () const noexcept |
| Returns the detected DRM driver. | |
| RCore & | core () const noexcept |
| Returns the RCore instance that owns this device. | |
| RGLDevice * | asGL () noexcept |
| Attempts to cast this device to an RGLDevice. | |
| RRSDevice * | asRS () noexcept |
| Attempts to cast this device to an RRSDevice. | |
| RVKDevice * | asVK () noexcept |
| Attempts to cast this device to an RVKDevice. | |
| const Caps & | caps () const noexcept |
| Returns the capabilities of this device. | |
Public Member Functions inherited from RObject | |
| RObject ()=default | |
| Constructs a default RObject. | |
Public Attributes | |
| CZLogger | log { RLog } |
| Logger for messages related to this device. | |
A rendering device.
An RDevice represents a single GPU (or software renderer) usable for allocation and rendering. There is typically one device per DRM node; systems with multiple GPUs expose several, enabling hybrid-GPU (Prime) setups where buffers are allocated on one device and sampled on another via DMA-buf sharing.
Devices are enumerated and owned by RCore. Each exposes its capabilities (RDevice::Caps) and the texture/render/DMA formats it supports. Use RCore::mainDevice() for the primary device.
| struct CZ::RDevice::Caps |
Device capabilities.
| Class Members | ||
|---|---|---|
| bool | Rendering | Supports rendering (as opposed to allocation/scanout only). |
| bool | AddFb2Modifiers | Supports creating DRM framebuffers with explicit format modifiers. |
| bool | DumbBuffer | Supports allocating dumb buffers. |
| bool | SyncCPU | Supports RSync-based client-side synchronization. |
| bool | SyncGPU | Supports RSync-based host-side synchronization. |
| bool | SyncImport | Supports RSync synchronization with external devices. |
| bool | SyncExport | Supports exporting RSync fences to external devices. |
| bool | Timeline | Supports timeline (as opposed to binary) synchronization. |
|
noexcept |
Destructor.
Destroys the GBM device and closes the DRM file descriptors it owns.
|
pure virtualnoexcept |
|
inlinenoexcept |
Returns the primary DRM file descriptor.
|
inlinenoexcept |
Returns the read-only DRM file descriptor.
|
inlinenoexcept |
Returns the user data associated with the DRM device.
|
inlinenoexcept |
Returns the device id (dev_t) of the DRM node.
|
inlinenoexcept |
Returns the path of the DRM node.
/dev/dri/card0), or an empty string if none.
|
inlinenoexcept |
Returns the DRM driver name.
"amdgpu"), or "Unknown" if not detected.
|
inlinenoexcept |
Returns the detected DRM driver.
|
noexcept |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
Returns the capabilities of this device.
| CZLogger log { RLog } |
Logger for messages related to this device.