Skip to main content

Crate goldy

Crate goldy 

Source
Expand description

§Goldy

A GPU library targeting Vulkan 1.4+, DX12, and Metal.

§Quick Start

use goldy::{Instance, DeviceType};

let instance = Instance::new().unwrap();
let adapter = instance.request_adapter(&Default::default()).unwrap();
let device = adapter.request_device(&Default::default()).unwrap();

Re-exports§

pub use error::GoldyError;
pub use exchange::Claim;
pub use exchange::DepositTransaction;
pub use exchange::MemoryExchange;
pub use exchange::SurfaceExchange;
pub use exchange::WithdrawBytes;
pub use exchange::WithdrawClaim;
pub use exchange::WithdrawTransaction;
pub use frame_orchestrator::FrameHandle;
pub use frame_orchestrator::FrameOrchestrator;
pub use parcel::field;
pub use parcel::ordinal;
pub use parcel::Buffer;
pub use parcel::Init;
pub use parcel::Parcel;
pub use parcel::RecordField;
pub use parcel::Texture;
pub use retained_pool::RetainedPool;
pub use scheme::Lease;
pub use scheme::LeaseRenderTarget;
pub use scheme::ReplayStats;
pub use scheme::Scheme;
pub use scheme::SchemeRenderPassBuilder;
pub use scheme::Submission;
pub use scheme::Transaction;
pub use swapchain_pool::AcquiredPresent;
pub use swapchain_pool::PresentLease;
pub use task_graph::ShaderResourceSlot;
pub use task_graph::PRESENT_LEASE_SLOT_PLACEHOLDER;
pub use buffer::StructuredBufferElement;
pub use compute::ComputePipeline;
pub use context::Context;
pub use device::Adapter;
pub use device::AdapterInfo;
pub use device::BufferHeapStats;
pub use device::Device;
pub use device::DeviceCapabilities;
pub use device::DeviceDescriptor;
pub use device::Instance;
pub use device::PowerPreference;
pub use device::RequestAdapterOptions;
pub use device::TextureHeapStats;
pub use device::VideoMemoryInfo;
pub use pipeline::RenderPipeline;
pub use pipeline::RenderPipelineDesc;
pub use sampler::Sampler;
pub use shader::builtins;
pub use shader::ShaderModule;
pub use shader_library::ShaderLibrary;
pub use signal::OversubscribedReason;
pub use signal::Signal;
pub use slang::layout_validation_enabled;
pub use slang::LayoutCheck;
pub use slang::StructFieldLayout;
pub use slang::StructLayout;
pub use task_graph::NodeAccess;
pub use texture::TextureCopyFootprint;
pub use types::PresentMode;
pub use types::SurfaceConfig;
pub use raw_window_handle;
pub use types::*;

Modules§

buffer
GPU buffer management.
compute
Compute pipeline management.
context
Submission/timeline context bound to a Device.
device
GPU device management.
error
exchange
Erased exchange transactions and claims.
frame_orchestrator
Pipelined frame scheduling: in-flight timeline ring, depth cap, present stamp.
parcel
Retained GPU property: Buffer (acquired aggregate) and Parcel (bindable unit).
pipeline
Render pipeline management.
retained_pool
Gate-free retained allocation pool — the public door for deed-held GPU memory.
sampler
GPU sampler management.
scheme
Retained scheme — goldy’s primary submission unit.
shader
Shader module management.
shader_cache
Persistent Slang compilation cache (~/.cache/goldy/shader_cache.bin.zst).
shader_library
Shader library system for reusable Slang modules.
shaders
Slang shader source code - single source of truth for all shaders.
signal
GPU backend signals and the delivery queue used by crate::Context::poll_signals.
slang
Slang shader compiler integration.
swapchain_pool
Swapchain pool — N-backed present leases for retained schemes.
task_graph
Shared graph IR, barrier analysis, and submit engine used by crate::Scheme.
texture
Internal GPU texture backing for crate::Texture parcels.
tracy
Tracy profiler integration.
transient_pool
Epoch-gated transient parcel pool — recycled GPU memory without a client-visible clock.
types
Common types used throughout Goldy.
validation_env
Environment-driven validation switches (GOLDY_VALIDATION, GOLDY_VALIDATE_LAYOUTS).

Macros§

goldy_event
Emit a structured event at an observation point.
goldy_span
Create a span for timing a section of code.
tracy_frame_mark
tracy_plot
tracy_zone

Structs§

BudgetPolicy
Byte-level tracking with an optional budget enforced before GPU allocation.
DeferredPayload
A type-erased bundle of GPU resources to be held alive until a GPU timeline epoch retires.

Functions§

dx12_debug_mode
Whether the DX12 backend is running with the D3D12 debug layer enabled.

Type Aliases§

SamplerHandle
Opaque handle for a GPU sampler object.
TextureHandle
Opaque handle for a GPU texture object.

Derive Macros§

LayoutCheckable
Derive a LAYOUT_CHECK constant for #[repr(C)] structs.
StructuredBufferElement
Marker trait for types safe to pass to [goldy::Device::alloc_buffer_with_data].