device
Generated Rust API reference for byte_engine.
byte_engine / rendering / device
Module device
The GHI device that the rendering and loading timelines both come from.
Quick Reference
| Item | Kind | Description |
|---|---|---|
GraphicsDevice | struct | The GraphicsDevice struct is the shared root of the rendering and loading timelines. |
Structs
GraphicsDevice
struct GraphicsDevice {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/device.rs:17-23
The GraphicsDevice struct is the shared root of the rendering and loading timelines.
Rendering and loading each own a context of this device and submit on a queue of their own: the renderer on
the graphics queue and the Loader on the copy queue. Neither timeline
waits on the other. Loaded resources reach the renderer only through the loader's notifications. Keep this
value alive until both contexts have been dropped. The loading timeline design
explains why the timelines stay independent.
Next, create the renderer with Renderer::new and the loader with
Loader::new.
Implementations
-
fn new(parameters: impl Parameters) -> SelfCreates the device, its graphics queue, and its copy queue from application parameters.
Parameters
Read from
parameters, therendersubtree of the application's:-
debug: Enables validation layers for debugging. Defaults to true on debug builds. -
debug.dump: Enables API dump for debugging. Defaults to false. -
debug.extended: Enables extended validation for debugging. Defaults to false. -
debug.labels: Enables graphics API object labels and command debug groups. Defaults todebug. -
ghi.features.mesh-shading: Enables mesh shading features on the device. Defaults to true. -
pipeline-cache.path: When set, the application owns the compiled pipeline cache instead of the GPUdriver. The
Rendererreads and writes the file. Defaults to none.
-
-
fn create_context(&self) -> ghi::implementation::ContextCreates a context on this device for a timeline of its own.
Each timeline owns one context and submits only on its own queue. Resources move between the contexts of one
device with
export_imageand -
fn graphics_queue(&self) -> ghi::QueueHandleReturns the queue the renderer records and presents frames on.
-
fn copy_queue(&self) -> ghi::QueueHandleReturns the queue the loader submits its upload batches on.
Trait Implementations
impl ArchivePointee for GraphicsDevice
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for GraphicsDevice
impl Downcast for GraphicsDevice
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for GraphicsDevice
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for GraphicsDevice
impl LayoutRaw for GraphicsDevice
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for GraphicsDevice
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for GraphicsDevice
-
type Metadata = ()