molgfx-gpu 0.5.8

The backend-agnostic GPU hardware abstraction: device, queue, encoder and surface traits.
Documentation
//! The backend-agnostic GPU hardware abstraction: device, queue, encoder and
//! surface traits.
//!
//! This is an interface crate: traits, descriptor structs, capability flags
//! and typed errors. No logic lives here. Backends implement the traits with
//! their own concrete resource types via associated types, so the renderer
//! above is generic over the device with no dynamic dispatch on the hot
//! path, and callers above the backend layer never name a backend.

#![forbid(unsafe_code)]

mod capabilities;
mod descriptors;
mod device;
mod device_loss;
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
mod drive;
mod encoder;
mod error;
mod host;
mod queue;
mod residency;
mod surface;
mod timestamp_capture;

pub use capabilities::{Capabilities, CapabilityFlags, RayQueryLimits, TextureFormatCapabilities};
pub use descriptors::{
    AabbGeometry, AabbGeometrySize, AccelerationGeometryFlags, AccelerationStructureBinding,
    AccelerationStructureFlags, AccelerationStructureLayoutEntry, AccelerationStructureUpdateMode,
    BindGroupDesc, BindGroupEntry, BindGroupLayoutDesc, BindGroupLayoutEntry, BindingType,
    BlasBuildDesc, BlasDesc, BlasGeometries, BlasGeometrySizes, BlendMode, BufferDesc, BufferUsage,
    ColorAttachment, ColorTarget, CompareFunction, ComputePassDesc, ComputePipelineDesc,
    DepthAttachment, DepthLoadOp, DepthState, FilterMode, IndexFormat, LoadOp, PrimitiveTopology,
    RayQueryBindGroupDesc, RayQueryBindGroupLayoutDesc, RenderPassDesc, RenderPipelineDesc,
    SamplerDesc, ShaderModuleDesc, ShaderStages, TextureDesc, TextureDimension, TextureFormat,
    TextureUsage, TextureViewDesc, TextureWrite, TimestampWrites, TlasDesc, TlasInstance,
    TriangleGeometry, TriangleGeometrySize,
};
pub use device::{
    Device, DeviceDesc, Opened, PollOutcome, PowerPreference, RayQueryDevice, ResourceMemory,
    WindowSource, WindowTarget,
};
pub use device_loss::{DeviceLoss, DeviceLossReason};
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
pub use drive::block_on_polling;
pub use encoder::{CommandEncoder, ComputePassEncoder, RayQueryCommandEncoder, RenderPassEncoder};
pub use error::GpuError;
pub use host::{HostDevice, HostDeviceDesc, ImportedTarget};
pub use queue::{Queue, Readback};
pub use residency::{
    ArenaAllocation, ArenaError, ArenaMetrics, CommandScratch, CommandScratchMetrics, FenceValue,
    PagedArena, Retirement, ScratchFull, UploadBackpressure, UploadMetrics, UploadReservation,
    UploadRing, UploadRingConfig, UploadState, UploadTicket,
};
pub use surface::{Surface, SurfaceConfig, SurfaceError, SurfaceFrame};
pub use timestamp_capture::{
    MAX_TIMESTAMP_CAPTURE_PASSES, PassTimestampAbsence, PassTimestampCapture, PassTimestampRecord,
    TimestampCaptureError, TimestampCaptureIncomplete, TimestampPassKind, TimestampQueryPair,
};